Cron syntax
A scheduled trigger runs on one of two modes: Interval (every N units, evenly spaced) or Cron (fixed clock times). See also the scheduled trigger guide.
Interval mode
Section titled “Interval mode”Runs every N units after the previous run.
Format: {N}{unit}
| Unit | Meaning | Example |
|---|---|---|
s |
seconds | 45s |
m |
minutes | 30m |
h |
hours | 2h |
d |
days | 1d |
N must be a positive whole number. Anything else is invalid and the trigger won’t run.
Examples:
| Value | Description |
|---|---|
30m |
Every 30 minutes |
2h |
Every 2 hours |
45s |
Every 45 seconds |
1d |
Every day |
Cron mode
Section titled “Cron mode”Runs at fixed clock times, in UTC.
Format: five space-separated fields
minute hour day-of-month month weekday| Position | Field | Range | Notes |
|---|---|---|---|
| 1 | minute | 0–59 | |
| 2 | hour | 0–23 | |
| 3 | day-of-month | 1–31 | |
| 4 | month | 1–12 | |
| 5 | weekday | 0–7 | Sunday is both 0 and 7 |
Special characters:
| Character | Meaning | Example |
|---|---|---|
* |
Any value | * in the hour field = every hour |
*/n |
Every nth value | */6 in the hour field = every 6 hours |
a-b |
Range | 1-5 in the weekday field = Mon–Fri |
a,b |
List | 0,12 in the hour field = midnight and noon |
All times are UTC. An invalid cron expression means the trigger simply doesn’t run — no error is raised.
Examples:
| Expression | Description |
|---|---|
*/15 * * * * |
Every 15 minutes |
0 * * * * |
Every hour, on the hour |
0 */6 * * * |
Every 6 hours (00:00, 06:00, 12:00, 18:00 UTC) |
0 3 * * * |
Daily at 03:00 UTC |
0 0 * * 1 |
Every Monday at 00:00 UTC |
0 0 * * 0 |
Every Sunday at 00:00 UTC |
Which mode to use
Section titled “Which mode to use”Use Interval when you want evenly spaced runs regardless of clock time — “every 30 minutes after the last run.”
Use Cron when you want runs at specific clock times — “every day at 03:00 UTC,” “every Monday.”