Run a Cron Job Every Sunday
0 0 * * 0 fires once a week at Sunday midnight — the schedule behind the @weekly alias. Sunday-night runs are popular for weekly rollups and maintenance because they finish before Monday traffic arrives.
0 0 * * 0In plain English: At 00:00 (midnight), on Sunday.
Field by field
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | 0 |
| Hour | 0 | 0 |
| Day of month | * | every day |
| Month | * | every month |
| Day of week | 0 | Sunday |
Variations
0 0 * * SUNsame schedule with the day name0 4 * * 0Sundays at 04:00 — after Saturday-night batch jobs settle0 0 * * 7identical — cron accepts 7 for Sunday tooTweak any of these in the crontab explainer to see the schedule in plain English and its next run times.
Frequently asked questions
Is 0 0 * * 0 the same as @weekly?
Yes — @weekly is an alias for exactly this expression in cron implementations that support @ shortcuts.
Why do both 0 and 7 mean Sunday?
Historical compatibility: System V cron used 0-6, other variants used 1-7. Modern cron accepts both, so 0 and 7 in the day-of-week field are interchangeable Sundays.
Related schedules
New to cron syntax? Read Cron Expressions Explained, Field by Field.