Skip to main content
Version: v5.0

Workflow scheduling

Workflow scheduling#

The Workflow Service scheduling system organizes and manages schedules as sub-resources under workflow definitions. Each workflow definition can have one or more schedules, which determine when and how workflow instances are triggered for execution.

Schedules are typically defined using cron expressions for flexible and precise time-based automation. The service provides RESTful APIs to create, get, update, and delete schedules associated with a specific workflow definition.

This hierarchical structure ensures that all scheduling logic is tightly coupled to the lifecycle and context of the workflow definition. This enables robust orchestration, easy management, and clear traceability of automated workflow executions within the platform.

Workflow scheduling concepts#

TermDescription
ScheduleCreate a Schedule to define when a workflow runs. For more information, see Schedule. ​​
JobA job represents the executable unit tied to a specific workflow definition. Each schedule results in the creation of a job in the scheduler.
TriggerA trigger determine the precise timing and recurrence of job execution. One or more triggers are associated with each job. Triggers use cron expressions to specify intervals (for example, every hour, every Monday at 9.00 AM) and can be managed independently. This allows for flexible scheduling and rescheduling of workflow runs.

Schedule#

Create a Schedule to define when a workflow runs based on the schedule type, a run interval cron expression, and a timezone parameter:

Schedule definition example

{  "_namespaces": ["default"],  "_schedule": {    "_type": "TIME_BASED",    "_runInterval": "0 0/5 * ? * * *",  // Every 5 minutes    "_timeZone": "UTC"  },  "_inputParams":{    "param1": "test"  }}
ParameterTypeDescription
_namespacesArray of StringAn array of namespaces you want to add the Schedule to
_scheduleObjectAn object with your type, run interval, and timezone parameters
_typeStringDefines the Schedule type. Enter "TIME_BASED"
_runIntervalStringEnter a cron expression
_timeZoneStringEnter a timezone, such as "UTC".
_inputParamsObjectAn object that contains your parameter names and values in key-balue pairs

Cron expressions#

To define a cron expression for the _runInterval parameter, adhere to the guidelines in the following table:

Cron expression values

FieldRequiredAllowed values
SecondsYes0-59
MinutesYes0-59
HoursYes0-23
Day of MonthYes1–31
MonthYes1–12 or JAN–DEC
Day of WeekYes1–7 or SUN–SAT
YearNoempty, 1970–2099

For example, the following run interval cron expression commands the schedule to run on July 16th 2025 at 02:06:00:

0 06 02 16 7 ? 2025

For a detailed breakdown, see the following table:

Cron expression values

FieldValueRuns on/at
Seconds00 seconds on the hour
Minutes066 minutes past the hour
Hours022 AM
Day of Month1616th day of the month
Month7July, 7th month of the year
Day of Week?ignored
Year20252025

See the following common examples that you can copy and modify:

ExpressionMeaning
0 0 12 * * ?Run at 12pm (noon) every day
0 15 10 ? * *Run at 10:15am every day
0 15 10 * * ?Run at 10:15am every day
0 15 10 * ? Run at 10:15am every day
0 15 10 * * ? 2005Run at 10:15am every day during the year 2005
0 14 * ?Run every minute starting at 2pm and ending at 2:59pm, every day
0 0/5 14 * * ?Run every 5 minutes starting at 2pm and ending at 2:55pm, every day
0 0/5 14,18 * * ?Run every 5 minutes starting at 2pm and ending at 2:55pm, AND Run every 5 minutes starting at 6pm and ending at 6:55pm, every day
0 0-5 14 * * ?Run every minute starting at 2pm and ending at 2:05pm, every day
0 10,44 14 ? 3 WEDRun at 2:10pm and at 2:44pm every Wednesday in the month of March.
0 15 10 ? * MON-FRIRun at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday
0 15 10 15 * ?Run at 10:15am on the 15th day of every month
0 15 10 L * ?Run at 10:15am on the last day of every month
0 15 10 L-2 * ?Run at 10:15am on the 2nd-to-last last day of every month
0 15 10 ? * 6LRun at 10:15am on the last Friday of every month
0 15 10 ? * 6LRun at 10:15am on the last Friday of every month
0 15 10 ? * 6L 2002-2005Run at 10:15am on every last Friday of every month during the years 2002, 2003, 2004 and 2005
0 15 10 ? * 6#3Run at 10:15am on the third Friday of every month
0 0 12 1/5 * ?Run at 12pm (noon) every 5 days every month, starting on the first day of the month.
0 11 11 11 11 ?Run every November 11th at 11:11am.