apscheduler.executors.base

class apscheduler.executors.base.BaseExecutor

Bases: object

Abstract base class that defines the interface that every executor must implement.

shutdown(wait=True)

Shuts down this executor.

Parameters:

wait (bool) – True to wait until all submitted jobs have been executed

start(scheduler, alias)

Called by the scheduler when the scheduler is being started or when the executor is being added to an already running scheduler.

Parameters:
submit_job(job, run_times)

Submits job for execution.

Parameters:
  • job (Job) – job to execute

  • run_times (list[datetime]) – list of datetimes specifying when the job should have been run

Raises:

MaxInstancesReachedError – if the maximum number of allowed instances for this job has been reached

exception apscheduler.executors.base.MaxInstancesReachedError(job)

Bases: Exception

async apscheduler.executors.base.run_coroutine_job(job, jobstore_alias, run_times, logger_name)

Coroutine version of run_job().

apscheduler.executors.base.run_job(job, jobstore_alias, run_times, logger_name)

Called by executors to run the job. Returns a list of scheduler events to be dispatched by the scheduler.

Module Contents

class apscheduler.executors.base.BaseExecutor

Bases: object

Abstract base class that defines the interface that every executor must implement.

shutdown(wait=True)

Shuts down this executor.

Parameters:

wait (bool) – True to wait until all submitted jobs have been executed

start(scheduler, alias)

Called by the scheduler when the scheduler is being started or when the executor is being added to an already running scheduler.

Parameters:
submit_job(job, run_times)

Submits job for execution.

Parameters:
  • job (Job) – job to execute

  • run_times (list[datetime]) – list of datetimes specifying when the job should have been run

Raises:

MaxInstancesReachedError – if the maximum number of allowed instances for this job has been reached