Skip to main content

Trigger configuration

Triggers define when and how workflows are executed. They are configured at the workflow level and determine the events that cause a workflow to run.

Schema

See Schema Reference for the complete #Trigger and #Schedule definitions.

Fields

trigger (optional)

The trigger configuration object that defines when the workflow executes.

Type: Trigger object

Default: None (workflow runs only when manually triggered)

Trigger Types

Schedule Triggers

Schedule triggers run workflows at specific times using cron expressions.

Field: schedule

A list of schedule objects, each containing a cron expression.

Type: list of Schedule objects

Example:

trigger:
schedule:
- cron: "0 0 * * *" # Daily model retraining
- cron: "0 */6 * * *" # Data refresh every 6 hours

Cron Expression Format

Cron expressions use the standard 5-field format:

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

Timezone: All cron expressions are evaluated in UTC timezone.

Special Characters:

  • * — any value.
  • , — value list separator (e.g., 1,3,5).
  • - — range of values (e.g., 1-5).
  • / — step values (e.g., */15 for every 15 units).

Common Cron Patterns

PatternDescription
0 0 * * *Daily at midnight UTC
0 */6 * * *Every 6 hours
0 9 * * 1-5Weekdays at 9 AM
0 0 1 * *First day of every month
*/15 * * * *Every 15 minutes
0 0 * * 0Every Sunday at midnight
30 2 * * *Daily at 2:30 AM

Schedule Inputs

Schedules can provide input values for workflows that define inputs.

Field: inputs (optional map of string to string)

Example:

inputs:
dataset:
type: string
required: true

trigger:
schedule:
- cron: "0 0 * * *"
inputs:
dataset: full-training-set
- cron: "0 12 * * *"
inputs:
dataset: validation-set

Each schedule can provide different input values, allowing the same workflow to run with different parameters at different times.

Concurrent Execution: Each schedule triggers independently. If multiple schedules fire at the same time, they run as separate concurrent workflow executions.

See Workflow Inputs for more details on defining and using inputs.

Future Trigger Types

The trigger system is designed to be extensible. Future versions may include triggers from other HAIC services.


Feedback