Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
105 lines (83 sloc) 5.05 KB

Migrating from previous versions of APScheduler

From v3.0 to v3.2

Prior to v3.1, the scheduler inadvertently exposed the ability to fetch and manipulate jobs before the scheduler had been started. The scheduler now requires you to call scheduler.start() before attempting to access any of the jobs in the job stores. To ensure that no old jobs are mistakenly executed, you can start the scheduler in paused mode (scheduler.start(paused=True)) (introduced in v3.2) to avoid any premature job processing.

From v2.x to v3.0

The 3.0 series is API incompatible with previous releases due to a design overhaul.

Scheduler changes

Job store changes

The job store system was completely overhauled for both efficiency and forwards compatibility. Unfortunately, this means that the old data is not compatible with the new job stores. If you need to migrate existing data from APScheduler 2.x to 3.x, contact the APScheduler author.

The Shelve job store had to be dropped because it could not support the new job store design. Use SQLAlchemyJobStore with SQLite instead.

Trigger changes

From 3.0 onwards, triggers now require a pytz timezone. This is normally provided by the scheduler, but if you were instantiating triggers manually before, then one must be supplied as the timezone argument.

The only other backwards incompatible change was that get_next_fire_time() takes two arguments now: the previous fire time and the current datetime.

From v1.x to 2.0

There have been some API changes since the 1.x series. This document explains the changes made to v2.0 that are incompatible with the v1.x API.

API changes

Configuration changes

  • The scheduler can no longer be reconfigured while it's running