Cron Syntax Reference
Standard five-field cron expressions schedule commands on Unix-like systems. Vixie cron, systemd timers, and Kubernetes CronJobs each add extensions — verify your scheduler’s manual.
Field order
┌──────── minute (0–59)
│ ┌────── hour (0–23)
│ │ ┌──── day of month (1–31)
│ │ │ ┌── month (1–12)
│ │ │ │ ┌ day of week (0–7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * * command
Special characters
| Char | Meaning |
|---|---|
* | Any value |
, | List (e.g. 1,15) |
- | Range (e.g. 1-5) |
/ | Step (e.g. */15 every 15) |
Day-of-month vs day-of-week
When both fields are restricted (not *), Vixie cron runs if either field matches (OR semantics). This surprises many operators — set one field to * if you intend AND logic.
@special strings (some implementations)
| Macro | Equivalent |
|---|---|
@yearly | 0 0 1 1 * |
@monthly | 0 0 1 * * |
@weekly | 0 0 * * 0 |
@daily | 0 0 * * * |
@hourly | 0 * * * * |