Cheat Sheets · Cron Cheat Sheet · Cron Weekends Only — Crontab Example
Cron Weekends Only — Crontab Example
0 10 * * 6,0
Runs at 10:00 AM on Saturdays and Sundays only.
Field by field
| Field | Value | Meaning |
|---|---|---|
Minute | 0 | At minute 0 |
Hour | 10 | At 10 AM |
Day of month | * | Every day (unrestricted) |
Month | * | Every month |
Day of week | 6,0 | Saturday and Sunday |
Weekend-only schedules come from a comma list in the day-of-week field: 6,0 (Saturday, Sunday) — order does not matter, 0,6 is identical.
This is also the page to learn cron's most surprising rule: when both day-of-month and day-of-week are restricted, cron runs when EITHER matches — a union, not an intersection. 0 0 1 * 6,0 therefore fires on the 1st of every month AND every Saturday and Sunday. Keep the field you do not care about as *.
0 10 * * 6,0 /usr/local/bin/weekend-maintenance.sh
Related schedules
FAQ
Why did my job run on the 15th when I set 6,0 and 15?
That is the union trap: day-of-month 15 plus day-of-week weekend means "the 15th, or any weekend day". Restrict only one of the two fields.
Saturday = 6, Sunday = 0 — can I write 7?
Yes, 7 is also Sunday in most implementations. Within a comma list, 0,6 and 6,7 both mean Sat+Sun — but do not mix 0 and 7 in ranges.
Every Sunday specifically?0 10 * * 0 — a single 0 in day-of-week gives you Sundays only.
Stop memorizing — build it interactively
Try this schedule in the Cron EditorFull reference: Cron Cheat Sheet