Python Apscheduler Not Shutting Down
I'm trying to stop the apscheduler from running on by removing the job and shutting it down completely! None of them is working, my function expire_data still gets triggered def p
Solution 1:
Question: I'm trying to stop the
apscheduler
from running
You are using a BlockingScheduler
, therefore you can't.
APSchedulerBlockingScheduler
BlockingScheduler is the simplest possible scheduler. It runs in the foreground, so when you call start(), the call never returns.
Read about Choosing the right scheduler
- BlockingScheduler: use when the scheduler is the only thing running in your process
- BackgroundScheduler: use when you’re not using any of the frameworks below, and want the scheduler to run in the background inside your application
- AsyncIOScheduler: use if your application uses the asyncio module
- GeventScheduler: use if your application uses gevent
- TornadoScheduler: use if you’re building a Tornado application
- TwistedScheduler: use if you’re building a Twisted application
- QtScheduler: use if you’re building a Qt application
Post a Comment for "Python Apscheduler Not Shutting Down"