I had a similar problem, where my scheduler process was a uWSGI MULE process and there was a separate app where I wanted to add new jobs. Looking at the BaseScheduler 's add_job() function: with self. _jobstores_lock: if not nning: ((job, jobstore, replace_existing)) ('Adding job tentatively -- it will be properly scheduled when the scheduler starts') else: self. _real_add_job(job, jobstore, replace_existing, True) you can see the problem: the scheduler adds jobs only when it is already started. The solution is fortunately quite simple, we should define our own " add-job-only " Scheduler: class JobAddScheduler(BlockingScheduler): def add_job(self, func, trigger=None, args=None, kwargs=None, id=None, name=None, misfire_grace_time=undefined, coalesce=undefined, max_instances=undefined, next_run_time=undefined, jobstore='default', executor='default', replace_existing=False, **trigger_args): job_kwargs = { 'trigger': self.
If you are looking for a quick but scalable way to get a scheduling service up and running for a task, APScheduler might just be the trick you are looking for. You can start using this scheduler right from the start of the development of your application and scale it as per your product scales. A simple flask app to do just this would look something like this from flask import Flask, request from ckground import BackgroundScheduler from datetime import datetime schedule_app = Flask(__name__) # initialize scheduler with your preferred timezone scheduler = BackgroundScheduler({'apscheduler.