The expression
0 0 * * 6,0
Runs at midnight at the start of Saturday and at the start of Sunday: twice a week, never on a weekday.
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 |
at minute 0 |
| Hour | 0 |
at midnight |
| Day of month | * |
any day |
| Month | * |
every month |
| Day of week | 6,0 |
Saturday (6) and Sunday (0) |
The weekend is written as a list, not a range, because Sunday is 0: the week runs 0 (Sunday) to 6 (Saturday). Standard cron also accepts 7 for Sunday, so 6,7 and 6-7 work in Vixie cron and cronie, and SAT,SUN is the clearest form. 0,6 is identical to 6,0; order in a list doesn't matter.
Variants
| Schedule | Expression |
|---|---|
| Saturday and Sunday at 10am | 0 10 * * 6,0 |
| Every hour on weekends | 0 * * * 6,0 |
| Saturday only, at 2am | 0 2 * * 6 |
| Sunday only, at midnight | 0 0 * * 0 |
| Weekdays instead | 0 0 * * 1-5 |
| Once a week | 0 0 * * 0 |
| Friday evening to Monday morning, every 6 hours | 0 */6 * * 6,0 plus 0 18 * * 5 as a second entry |
Cron can't express a window that crosses midnight between two days in one line, so "from Friday 18:00" needs a separate entry for the Friday part.
Where to write it
- crontab (Linux, macOS):
0 0 * * 6,0 /usr/local/bin/full-backup.shincrontab -e, in the server's time zone. Weekends are the classic slot for heavy jobs like full backups, re-indexing orVACUUM. - GitHub Actions:
on: schedule: - cron: '0 0 * * 6,0', in UTC. For a team in the Americas, 00:00 UTC Saturday is still Friday evening, so pick an hour that falls inside the weekend for you, such as0 12 * * 6,0. - Kubernetes CronJob:
schedule: "0 0 * * 6,0"withtimeZone:so the weekend starts at your midnight. - AWS EventBridge:
cron(0 0 ? * SAT,SUN *). Day of month must be?. EventBridge numbers days 1 (Sunday) to 7 (Saturday), so in numbers the weekend is1,7, and6,0is rejected because there is no day 0.
Common mistakes
6-0is not a range. Ranges must go upwards; most parsers reject it, and some silently treat it as something else. Use6,0,6-7orSAT,SUN.- Copying numbers into AWS or Quartz. Their
6is Friday. - Adding a day of month.
0 0 1 * 6,0runs on every weekend day and on the 1st of every month, because cron ORs day of month and day of week when both are set.
Confirm the days in the Cron Expression Parser.