Cron Syntax Reference
A standard cron expression has five space-separated fields. Each field accepts specific values, ranges, lists, and step expressions.
Field reference
| Field | Position | Allowed values | Special characters |
|---|---|---|---|
| Minute | 1st | 0–59 | * / , - |
| Hour | 2nd | 0–23 | * / , - |
| Day of Month | 3rd | 1–31 | * / , - |
| Month | 4th | 1–12 | * / , - |
| Day of Week | 5th | 0–7 (0 & 7 = Sun) | * / , - |
Special characters
| Character | Name | Meaning | Example |
|---|---|---|---|
* | Wildcard | Every value in the field | * * * * *: every minute |
/ | Step | Every N values | */5 * * * *: every 5 min |
- | Range | From value to value | 0 9-17 * * *: 9 AM to 5 PM |
, | List | Multiple specific values | 0 8,20 * * *: 8 AM & 8 PM |
Shorthand strings
Many cron implementations support convenient aliases instead of a full five-field expression:
| String | Equivalent | Meaning |
|---|---|---|
@yearly | 0 0 1 1 * | Once a year, Jan 1 at midnight |
@monthly | 0 0 1 * * | Once a month, 1st at midnight |
@weekly | 0 0 * * 0 | Once a week, Sunday at midnight |
@daily | 0 0 * * * | Once a day at midnight |
@hourly | 0 * * * * | Once an hour, at minute 0 |
@reboot | (none) | Once at system startup |
Non-standard extensions
Some schedulers (Quartz, AWS EventBridge) extend the syntax beyond the standard five fields. Common extensions include L (last day of month/week), W (nearest weekday), and # (Nth weekday). These are not supported by vixie cron, GitHub Actions, or most Linux cron daemons.
Want to see what any expression does in plain English?
Translate an Expression →