DEV Community

Discussion on: Scheduling tasks using APScheduler in Django

Collapse
 
thelostkite profile image
the-lost-kite

It's because of development and deployment.
Add this condition before running your scheduler.
if os.environ.get('RUN_MAIN'):