Scheduling Workflows
The Scheduler allows you to trigger a workflow at a specific schedule. You can configure workflows to run at any desired frequency using cron expressions. A single workflow can be associated with multiple schedules. If there are many schedules, ensure the server capacity is sufficient to manage the load.
A schedule can be used for various cases, such as:
- Running a workflow at a fixed cadence, such as every hour.
- Running the same workflow at various cadences using different fixed inputs.
- Scheduling a workflow to run between specific dates.
- Running the workflow once at a future date.
Examples include:
- Renewing a TLS certificate for infrastructure components.
- Sending notifications ahead of renewals.
- Scanning of S3 or Blob storage daily to verify compliance with policies.
- Monitoring the health of a server, such as every 30 seconds.
Schedule parameters
Configure these parameters when creating a schedule.
| Parameter | Description | Required/ Optional |
|---|---|---|
| name | The name of the schedule. Must be alphanumeric and can include underscores. Renaming an existing schedule creates a new one. | Required. |
| description | A description of the schedule. | Optional. |
| cronExpression | A 6-field string defining the cadence using cron syntax. For configuration details, refer Using cron expression. | Required. |
| zoneId | The timezone in which the schedule runs. Default is UTC. | Required. |
| startworkflowRequest | A JSON object containing the details of the workflow to be scheduled. | Required. |
| startworkflowRequest. name | The name of the workflow to run. The creator of the schedule must have execute permission for this workflow. | Required. |
| startworkflowRequest. version | The version of the workflow to run. If not specified, the latest version will be used. | Optional. |
| startworkflowRequest. input | The input parameters for the workflow, provided as a JSON object. | Optional. |
| startworkflowRequest. correlationId | A unique identifier for the workflow execution, used to correlate the current workflow instance with other workflows. | Optional. |
| startworkflowRequest. idempotencyKey | A unique, user-generated key to prevent duplicate workflow executions. Idempotency data is retained throughout the life of the workflow execution. | Optional. |
| startworkflowRequest. idempotencyStrategy | The idempotency strategy for handling duplicate requests. Supported values:
| Required if idempotencyKey is used. |
| startworkflowRequest. priority | The priority of the workflow. Supports values from 0-99 and can be passed as a variable. | Optional. |
| scheduleStartTime | The start time for the schedule in Unix timestamp format (in milliseconds). | Optional. |
| scheduleEndTime | The end time for the schedule in Unix timestamp format (in milliseconds). | Optional. |
| taskToDomain | A mapping of task reference names to domain-specific values to route the task to defined workers. | Optional. |
| paused | Whether the schedule is paused upon saving. If set to true, the schedule will not run. Set to false to start the schedule immediately upon saving. Default is false. | Optional. |
| runCatchupScheduleInstances | If true, executes any pending schedules, such as when the server starts after downtime. | Optional |