Trying to schedule some tasks using APScheduler The following is the installation of apscheduler from settings.py
jobstores = { 'default': MongoDBJobStore(client=dup_client), } executors = { 'default': ThreadPoolExecutor(20), 'processpool': ProcessPoolExecutor(5) } job_defaults = { 'coalesce': False, 'max_instances': 3 } scheduler = BackgroundScheduler(jobstores=jobstores, executors=executors, job_defaults=job_defaults, timezone=TIME_ZONE) scheduler.start()
Adding a task:
job_id = scheduler.add_job(job_1,'interval', seconds=10)
As mentioned in the documentation, the APScheduler db and jobs collections are created. However, tasks are not completed.
I can see how memory jobs are being performed. The problem is with persistent job repositories.
source share