2

Function is scheduled for every 5 seconds and if functions takes more than 5 seconds to execute it skips the job. How to handle the skipping of job and wait the schedular till the previous job completes its execution.

Code:

from apscheduler.schedulers.blocking import BlockingScheduler
sched = BlockingScheduler()

@sched.scheduled_job('interval', id='my_job_id', seconds=5)
def my_interval_job():
    print 'Hello World!'
sched.start()
nkrivenko
  • 1,231
  • 3
  • 14
  • 23

0 Answers0