Schedule Triggers
Trigger workflows on a time-based schedule using cron or intervals
Schedule Triggers
Schedule triggers start workflows at specified times using cron expressions or interval-based scheduling. Powered by Trigger.dev's scheduling infrastructure.
Configuration
Schedule triggers support two modes: cron expressions and intervals.
{
"trigger": {
"type": "schedule",
"cron": "0 9 * * 1-5",
"timezone": "America/New_York",
"enabled": true
}
}{
"trigger": {
"type": "schedule",
"interval": {
"value": 30,
"unit": "minutes"
},
"timezone": "UTC",
"enabled": true
}
}| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "schedule" |
cron | string | No* | Cron expression (e.g., "0 9 * * 1-5") |
interval | object | No* | Interval configuration |
interval.value | number | Yes | Interval value (1-525600) |
interval.unit | string | Yes | minutes, hours, days, or weeks |
timezone | string | No | IANA timezone (default: "UTC") |
enabled | boolean | No | Enable/disable schedule (default: true) |
You must specify either cron or interval, but not both.
Cron Syntax
Cron expressions follow standard 5-field format:
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, Sunday=0)
│ │ │ │ │
* * * * *Special Characters
| Character | Description | Example |
|---|---|---|
* | Any value | * * * * * (every minute) |
, | List separator | 0,30 * * * * (at 0 and 30 minutes) |
- | Range | 0 9-17 * * * (9am to 5pm) |
/ | Step values | */15 * * * * (every 15 minutes) |
Common Schedules
| Schedule | Cron Expression | Description |
|---|---|---|
| Every minute | * * * * * | Runs every minute |
| Every 15 minutes | */15 * * * * | At 0, 15, 30, 45 past the hour |
| Every hour | 0 * * * * | At the start of every hour |
| Daily at 9am | 0 9 * * * | Every day at 9:00 AM |
| Weekdays at 9am | 0 9 * * 1-5 | Monday-Friday at 9:00 AM |
| Weekly on Monday | 0 9 * * 1 | Mondays at 9:00 AM |
| Monthly on 1st | 0 9 1 * * | First of month at 9:00 AM |
| Quarterly | 0 9 1 1,4,7,10 * | First of Jan, Apr, Jul, Oct |
Workflow Examples
Daily Invoice Sync (9am EST):
{
"name": "Daily Invoice Sync",
"trigger": {
"type": "schedule",
"cron": "0 9 * * *",
"timezone": "America/New_York"
},
"steps": [
{
"id": "fetch-invoices",
"type": "action",
"action": "quickbooks.listInvoices",
"config": {
"filter": "DueDate < '{{now}}'"
}
}
]
}Weekly Report (Fridays at 5pm):
{
"name": "Weekly Sales Report",
"trigger": {
"type": "schedule",
"cron": "0 17 * * 5",
"timezone": "America/Los_Angeles"
},
"steps": [...]
}Interval-Based Scheduling
For simpler recurring schedules, use intervals:
{
"trigger": {
"type": "schedule",
"interval": {
"value": 4,
"unit": "hours"
}
}
}Interval Units
| Unit | Max Value | Example |
|---|---|---|
minutes | 525600 (1 year) | Every 30 minutes |
hours | 8760 (1 year) | Every 4 hours |
days | 365 | Every day |
weeks | 52 | Every week |
Interval Examples
Every 30 minutes:
{
"trigger": {
"type": "schedule",
"interval": { "value": 30, "unit": "minutes" }
}
}Every 6 hours:
{
"trigger": {
"type": "schedule",
"interval": { "value": 6, "unit": "hours" }
}
}Weekly:
{
"trigger": {
"type": "schedule",
"interval": { "value": 1, "unit": "weeks" }
}
}Timezone Handling
Always specify a timezone for consistent execution times:
{
"trigger": {
"type": "schedule",
"cron": "0 9 * * *",
"timezone": "America/New_York"
}
}Common Timezones
| Region | Timezone |
|---|---|
| US Eastern | America/New_York |
| US Central | America/Chicago |
| US Mountain | America/Denver |
| US Pacific | America/Los_Angeles |
| UK | Europe/London |
| Central Europe | Europe/Berlin |
| India | Asia/Kolkata |
| Japan | Asia/Tokyo |
| Australia | Australia/Sydney |
| UTC | UTC |
Without a timezone, schedules default to UTC. This may cause unexpected execution times.
Daylight Saving Time
Schedules automatically adjust for DST transitions:
- Spring forward: A 2am schedule may skip when clocks move from 2am to 3am
- Fall back: A 1am schedule may run twice when clocks move from 2am to 1am
For critical schedules, consider using UTC to avoid DST edge cases.
Enabling and Disabling
Temporarily disable a schedule without deleting the workflow:
{
"trigger": {
"type": "schedule",
"cron": "0 9 * * *",
"enabled": false
}
}Re-enable by setting enabled: true or removing the field.
Input Data
Scheduled workflows receive execution metadata as input:
{
"input": {
"scheduledTime": "2024-01-15T09:00:00.000Z",
"executionTime": "2024-01-15T09:00:01.234Z",
"timezone": "America/New_York",
"schedule": {
"type": "cron",
"expression": "0 9 * * *"
}
}
}| Field | Description |
|---|---|
scheduledTime | When the run was scheduled to start |
executionTime | When the run actually started |
timezone | Configured timezone |
schedule.type | cron or interval |
schedule.expression | The cron or interval definition |
Access in your steps:
{
"config": {
"message": "Running scheduled job for {{input.scheduledTime}}"
}
}Execution Guarantees
At-Least-Once Delivery
Scheduled workflows are guaranteed to run at least once per scheduled time. In rare cases (infrastructure issues), a schedule may run more than once.
Design for idempotency:
{
"id": "process-daily",
"type": "action",
"config": {
"idempotencyKey": "daily-sync-{{input.scheduledTime | date: '%Y-%m-%d'}}"
}
}Missed Schedules
If a schedule is missed (workflow was paused, system outage), the missed execution is not automatically recovered. The next scheduled execution runs as normal.
For critical schedules, consider:
- Monitoring workflow run history
- Alerting on missed executions
- Running catch-up logic on workflow resume
Concurrency
By default, a new scheduled run starts even if the previous run is still executing. To prevent overlap:
{
"settings": {
"concurrencyLimit": 1
}
}Complete Example
{
"name": "Daily Overdue Invoice Reminder",
"description": "Send Slack reminders for overdue invoices every weekday at 9am",
"trigger": {
"type": "schedule",
"cron": "0 9 * * 1-5",
"timezone": "America/New_York"
},
"steps": [
{
"id": "fetch-overdue",
"type": "action",
"name": "Get Overdue Invoices",
"action": "quickbooks.listInvoices",
"config": {
"filter": "DueDate < '{{input.scheduledTime}}' AND Balance > 0"
}
},
{
"id": "check-count",
"type": "condition",
"name": "Check if any overdue",
"config": {
"conditions": {
"left": "{{steps.fetch-overdue.output.invoices.length}}",
"operator": "gt",
"right": "0"
},
"then": ["send-reminder"],
"else": []
}
},
{
"id": "send-reminder",
"type": "slack",
"name": "Send Slack Reminder",
"config": {
"action": "sendMessage",
"channel": "#finance",
"text": "You have {{steps.fetch-overdue.output.invoices.length}} overdue invoices totaling ${{steps.fetch-overdue.output.totalBalance}}"
}
}
]
}Troubleshooting
Schedule Not Running
- Check workflow status - Must be
active - Verify
enabled- Must betrue(or not set) - Check timezone - Ensure correct IANA timezone
- Validate cron - Use a cron validator tool
Wrong Execution Time
- Check timezone - Common issue is UTC vs local
- Verify DST - Times may shift during DST transitions
- Review cron syntax - Especially day-of-week (0 = Sunday)
Missing Runs
- Check workflow history - Confirm workflow was active
- Review system status - Check for outages
- Verify concurrency - Previous run may still be executing