Cron syntax
A scheduled automation runs on one of two modes: Interval (every N units, evenly spaced) or Cron (fixed clock times). See also the scheduled automation guide.
Interval mode
Section titled “Interval mode”Runs on a fixed grid aligned to the Unix epoch, not “N units after the previous run”: a run lands on a moment that’s a multiple of the interval in UTC, the same moment for every automation. heliana checks schedules roughly every 30 seconds; a slot missed within that window is skipped, not caught up later.
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 refused at save time with a message on the field: Interval must be a positive number followed by d, h, m or s.
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.
Format: five space-separated fields. A sixth field for seconds may be put in front, and shortcuts such as @daily are accepted. Whatever the expression, an automation never runs more often than once every 30 seconds.
minute hour day-of-month month weekdaySunday is both 0 and 7 in the weekday field.
Special characters:
| Character | Meaning | Example |
|---|---|---|
L |
Last | L in the day-of-month field = last day of the month |
W |
Nearest weekday | 15W in the day-of-month field = weekday nearest the 15th |
# |
Nth weekday | MON#1 in the weekday field = first Monday of the month |
Weekday and month names (MON, TUE, …, JAN, FEB, …) work in place of their numbers.
An expression the builder can’t parse, or one that would never run, is refused at save time with a message on the field: Cron expression is invalid or never runs.
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 |