apscheduler.schedulers.background
- class apscheduler.schedulers.background.BackgroundScheduler(gconfig={}, **options)
Bases:
BlockingSchedulerA scheduler that runs in the background using a separate thread (
start()will return immediately).Extra options:
daemonSet the
daemonoption in the background thread (defaults toTrue, see the documentation for further details)- shutdown(*args, **kwargs)
Shuts down the scheduler, along with its executors and job stores.
Does not interrupt any currently running jobs.
- Parameters:
wait (bool) –
Trueto wait until all currently executing jobs have finished- Raises:
SchedulerNotRunningError – if the scheduler has not been started yet
- start(*args, **kwargs)
Start the configured executors and job stores and begin processing scheduled jobs.
- Parameters:
paused (bool) – if
True, don’t start job processing untilresume()is called- Raises:
SchedulerAlreadyRunningError – if the scheduler is already running
RuntimeError – if running under uWSGI with threads disabled
API
- class apscheduler.schedulers.background.BackgroundScheduler(gconfig={}, **options)
Bases:
BlockingSchedulerA scheduler that runs in the background using a separate thread (
start()will return immediately).Extra options:
daemonSet the
daemonoption in the background thread (defaults toTrue, see the documentation for further details)- shutdown(*args, **kwargs)
Shuts down the scheduler, along with its executors and job stores.
Does not interrupt any currently running jobs.
- Parameters:
wait (bool) –
Trueto wait until all currently executing jobs have finished- Raises:
SchedulerNotRunningError – if the scheduler has not been started yet
- start(*args, **kwargs)
Start the configured executors and job stores and begin processing scheduled jobs.
- Parameters:
paused (bool) – if
True, don’t start job processing untilresume()is called- Raises:
SchedulerAlreadyRunningError – if the scheduler is already running
RuntimeError – if running under uWSGI with threads disabled
Introduction
BackgroundScheduler runs in a thread inside your existing application. Calling
start() will start the scheduler and it will continue running
after the call returns.
Default executor |
|
External dependencies |
none |
Example |
|