How do I schedule an interval job with APScheduler?

后端 未结 5 2047
情话喂你
情话喂你 2020-12-19 05:32

I\'m trying to schedule an interval job with APScheduler (v3.0.0).

I\'ve tried:

from apscheduler.schedulers.blocking import BlockingScheduler
sched =         


        
5条回答
  •  一个人的身影
    2020-12-19 05:49

    How can the next wakeup be due 254 seconds from now when the interval job is set to 5 seconds??

    It's simple: you have many pending executions as your most of the jobs didn't completed in the interval-window of time.

    You could use the following parameters in order to sort this out:

     **misfire_grace_time**:    Maximum time in seconds for the job execution to be allowed to delay before it is considered a misfire 
     **coalesce**:  Roll several pending executions of jobs into one
    

    To read more, check the documentation here.

提交回复
热议问题