On this page

    Scheduler

    This library provides functionality for scheduling jobs to be executed in the future, either once or repeatedly. To do so, a schedule is created for a job (i.e. a Workflow) by defining start and end dates, how often it will be repeated (once, hourly, daily, weekly, monthly), a specific date and time to be executed, for example:

    • hourly at xx:15
    • daily at 12:15
    • weekly every Wednesday at 12:15
    • montly on the 15th of the month, at 12:15

    and a configuration (if needed) for the execution.

    The schedule is stored in the database and a daemon checks the database every minute for jobs that are to be executed. For each such job a an event is raised, and the appropriate library (that listens for the event) will take over for the execution.

    For a workflow, the message will be scheduler.Workflow with a payload that consists of the id and the configuration to be used for the execution. The Worflow library has a trigger for such events, and upon it receives one it will submit the execution based on the workflow and the provided configuration.