Skip to main content

Timer Trigger

The Timer Trigger allows you to schedule workflow executions using cron expressions. This component can automatically initiate a workflow based on a specified schedule.

Usage

The cron expression is generated by parsing a user-friendly expression like "every day at 5 PM". This expression is then translated into the most accurate cron format possible to ensure that the result is shown to the user, minimizing the chances of mistakes.

Cron Expression Format

The cron expression follows the standard format:

┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of the month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
│ │ │ │ │
│ │ │ │ │
* * * * *

Examples

Daily Execution at 9 AM

{
"identifier": "daily-report",
"cronExpression": "0 9 * * *"
}

Weekly Execution on Monday at 8 AM

{
"identifier": "weekly-summary",
"cronExpression": "0 8 * * 1"
}

Weekday Execution at 3 PM

{
"identifier": "weekday-notification",
"cronExpression": "0 15 * * 1-5"
}

Every 15 Minutes

{
"identifier": "frequent-check",
"cronExpression": "*/15 * * * *"
}

Usage Notes

  • The Timer Trigger is executed by the workflow engine based on the specified cron expression
  • The workflow will be initiated automatically at the scheduled times
  • The trigger doesn't pass any specific data to the workflow, so it's typically used to start workflows that gather their own data

Best Practices

  1. Use descriptive identifiers that indicate the purpose and schedule of the trigger
  2. Cron expression uses UTC timezone, take that into account when creating your triggers.
  3. Monitor the execution history to ensure triggers are firing as expected