I don't know how to define job run time #762
Answered
by
agronholm
breezechime
asked this question in
Q&A
-
Things to check first
Feature descriptionThe following code cannot execute properly, It seems that nesting is not supported. trigger = AndTrigger([
IntervalTrigger(seconds=11),
OrTrigger([
CronTrigger(day_of_week='0-4'),
CronTrigger(day_of_week='0-4', hour='10', minute='0-59'),
CronTrigger(day_of_week='0-4', hour='11', minute='0-30'),
CronTrigger(day_of_week='0-4', hour='13-14', minute='0-59'),
CronTrigger(day_of_week='0-4', hour='15', minute='0-1'),
])
])
# A股
self.scheduler.add_job(func=self._callJob, args=(self.queue_spider, fetchAMarketSnapshot),
trigger=trigger, max_instances=100) Use caseThis is very important. If a more complex homework time cannot be defined, it will only be applied to simple areas |
Beta Was this translation helpful? Give feedback.
Answered by
agronholm
Jul 24, 2023
Replies: 1 comment 4 replies
-
This should be a post on the Q/A section of the discussion forum, not a feature request. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assuming a 10 second interval works too: