The Scheduler handles the queue of your background functions. It ensures the enqueuing and dequeuing happens in accordance to your configuration choices. It feeds executions to Runner instances, and checks the results.

The Scheduler orchestrates the Runner to create an execution. This page covers the lifecycle of an execution.

State definitions

  • Created: the execution is enqueued
  • Started: the execution is running
  • Cancelled: the execution has been Cancelled
  • Aborting: the execution is being aborted
  • Aborted: the execution has been aborted
  • Succeed: the execution has run without any error
  • Failed: the execution has failed with errors

State machine diagram

scheduler state machine diagram

Events and transitions

CallcreatedYour application calls a background function
RetryfailedcreatedThe execution has failed and retries are configured
Rerunsucceed, failedcreatedA rerun has been triggered from the console
CancelcreatedcancelledThe execution is cancelled from the console or the client
StartcreatedstartedThe Runner has picked up the execution from the queue
AbortstartedabortingThe execution abortion process is triggered from the console or the client
AbortedabortingabortedThe execution abortion is complete
FailstartedfailedThe execution has failed with error
SuccessstartedsucceedThe execution has completed successfully