Search code examples
python-3.xapscheduler

Change APScheduler default jobstore location


I am using APScheduler for my flask app and APScheduler stores the jobs I create in a MYSQL table called apscheduler_jobs.

default_jobstore = {'default': SQLAlchemyJobStore(engine=connection.get_engine())}

Is there any way I can change the table so it stores jobs under a a table named apscheduuler_jobs_new for instance. I would like the table to be within the same schema, just a different table.


Solution

  • You should be able to simply pass a parameter called tablename like the following

    default_jobstore = {'default': SQLAlchemyJobStore(tablename='my_scheduled', engine=connection.get_engine())}