Issue
I am executing a function every second using Python apscheduler (version 3.0.1)
code:
scheduler = BackgroundScheduler()
scheduler.add_job(runsync, 'interval', seconds=1)
scheduler.start()
It's working fine most of the time but sometimes I get this warning:
WARNING:apscheduler.scheduler:Execution of job "runsync (trigger: interval[0:00:01], next run at: 2015-12-01 11:50:42 UTC)" skipped: maximum number of running instances reached (1)
1.Is this the correct way to execute this method?
2.What does this warning mean? Does it affect the execution of tasks inside the function in anyway?
3.how to handle this?
Solution
It means that the task is taking longer than one second and by default only one concurrent execution is allowed for a given job. I cannot tell you how to handle this without knowing what the task is about.
Answered By - Alex Grönholm
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.