Hello,
I was fairly new in using APScheduler and was developing a Flask web project. After searching a lot of web pages, I believe I cannot solve this problem on my own, please help.
I was building a module which do a job in random interval, the job is bound with a unique id. So I used BackgroundScheduler to make an initial job, and after the job had done what I want, I created another job with the same id at the end, (I've added replace_existing=True, max_instances=1 in job's constructor, with default options 'coalesce': True, 'misfire_grace_time ': 0).
After the project was up and running, It fine at first, but after a while, (one or two reboots maybe), it began to run the job twice at the same time, like two identical jobs were running in parallel, the log excerpt reads:
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2015-01-21 07:09:46.231960+00:00 (in 2.149310 seconds)
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Looking for jobs to run
INFO:apscheduler.executors.default:Running job "delayed_praise-2380 (trigger: date[2015-01-21 07:09:46 UTC], next run at: 2015-01-21 07:09:46 UTC)" (scheduled at 2015-01-21 07:09:46.231962+00:00)
INFO:apscheduler.executors.default:Running job "delayed_praise-2380 (trigger: date[2015-01-21 07:09:46 UTC], next run at: 2015-01-21 07:09:46 UTC)" (scheduled at 2015-01-21 07:09:46.231962+00:00)
INFO:apscheduler.scheduler:Removed job delayed_praise-2380
DEBUG:apscheduler.scheduler:Next wakeup is due at 2015-01-21 07:09:47.029580+00:00 (in 0.787876 seconds)
INFO:apscheduler.scheduler:Removed job delayed_praise-2380
I've uploaded the full log file, it was done on my own laptop and the invertal time was reduced to 3 seconds to reproduce the same symptom in a short time.
I really need the job to be done only once... Someone may have the answer? Thanks.