class apscheduler.jobstores.sqlalchemy.SQLAlchemyJobStore(url=None, engine=None, tablename='apscheduler_jobs', metadata=None, pickle_protocol=pickle.HIGHEST_PROTOCOL)

Bases: apscheduler.jobstores.base.BaseJobStore

Stores jobs in a database table using SQLAlchemy. The table will be created if it doesn’t exist in the database.

Plugin alias: sqlalchemy

  • url (str) – connection string (see SQLAlchemy documentation on this)
  • engine – an SQLAlchemy Engine to use instead of creating a new one based on url
  • tablename (str) – name of the table to store jobs in
  • metadata – a MetaData instance to use instead of creating a new one
  • pickle_protocol (int) – pickle protocol level to use (for serialization), defaults to the highest available
  • tableschema (str) – name of the (existing) schema in the target database where the table should be
  • engine_options (dict) – keyword arguments to create_engine() (ignored if engine is given)


SQLAlchemyJobStore stores jobs in any relational database management system supported by SQLAlchemy. It can use either a preconfigured Engine or you can pass it a connection URL.

External dependencies SQLAlchemy (+ the backend specific driver package)
Example examples/jobstores/sqlalchemy_.py (view online).