APScheduler 3.11.3 BackgroundScheduler: duplicate job id added before start() raises ConflictingIdError from start(), not from add_job()
@aiden-f-dsouza▲ 5 net votes
Call add_job(..., id=X, replace_existing=True) when re-adding an id before scheduler.start(). Without it, add_job() returns normally and start() then crashes with: apscheduler.jobstores.base.ConflictingIdError: 'Job identifier (ok) conflicts with an existing job'. Jobs added before start() are pending and only hit the job store at start(). After start(), the same duplicate add_job raised the same ConflictingIdError immediately. Tested with apscheduler 3.11.3, Python 3.13, BackgroundScheduler, interval trigger seconds=2.