Cron is the classic Unix scheduler, and its five-field syntax now shows up everywhere: Kubernetes CronJobs, GitHub Actions, cloud schedulers and serverless platforms such as Cloudflare Workers Cron Triggers. Test any expression with our Cron Expression Explainer.
The five fields
┌───────── minute (0–59) │ ┌─────── hour (0–23) │ │ ┌───── day of month (1–31) │ │ │ ┌─── month (1–12 or JAN–DEC) │ │ │ │ ┌─ day of week (0–7 or SUN–SAT; 0 and 7 = Sunday) * * * * *
Special characters
| Char | Meaning | Example |
|---|---|---|
* | Every value | * * * * * every minute |
, | List | 0 8,12,18 * * * |
- | Range | 0 9-17 * * * |
/ | Step | */10 * * * * |
Some schedulers add non-standard extras: a seconds field, a year field, L (last), W (nearest weekday) or # (nth weekday). Check your platform's docs before using them.
25 ready-to-use schedules
| Schedule | Expression |
|---|---|
| Every minute | * * * * * |
| Every 5 minutes | */5 * * * * |
| Every 15 minutes | */15 * * * * |
| Every 30 minutes | */30 * * * * |
| Every hour | 0 * * * * |
| Every 2 hours | 0 */2 * * * |
| Every 6 hours | 0 */6 * * * |
| Daily at midnight | 0 0 * * * |
| Daily at 02:30 | 30 2 * * * |
| Twice a day (09:00, 21:00) | 0 9,21 * * * |
| Weekdays at 09:00 | 0 9 * * 1-5 |
| Every 10 min during work hours | */10 9-17 * * 1-5 |
| Weekends at 10:00 | 0 10 * * 6,0 |
| Every Monday at 08:00 | 0 8 * * 1 |
| Every Friday at 17:30 | 30 17 * * 5 |
| Sundays at 03:00 | 0 3 * * 0 |
| First of the month | 0 0 1 * * |
| 15th of the month at noon | 0 12 15 * * |
| 1st and 15th | 0 0 1,15 * * |
| Quarterly | 0 0 1 1,4,7,10 * |
| Every 3 months (alt.) | 0 0 1 */3 * |
| Yearly on 1 Jan | 0 0 1 1 * |
| Every 4 hours on weekdays | 0 */4 * * 1-5 |
| Last minute of each day | 59 23 * * * |
| On the hour, 8am–8pm | 0 8-20 * * * |
Macros
@yearly, @monthly, @weekly, @daily and @hourly are shortcuts supported by many implementations. @reboot runs once at start-up, but only on classic cron daemons.
Five pitfalls
- Time zone: servers and cloud schedulers usually run in UTC.
- Daylight saving: local-time jobs between 01:00 and 03:00 can be skipped or run twice when clocks change.
- Day-of-month OR day-of-week: when both fields are set, most crons run when either matches.
- Overlapping runs: if a job can take longer than its interval, add a lock so instances don't pile up.
- Silent failures: log output and alert on failures, or use a "heartbeat" monitor that expects a ping after each run.