Cron Every Sunday
Schedule a cron job to run every Sunday at midnight with 0 0 * * 0. Complete field explanation, weekend scheduling tips, and practical examples.
Cron Expression
0 0 * * 0
Field Breakdown
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | At 0 |
| Hour | 0 | At 0 |
| Day of Month | * | Every day of the month (1–31) |
| Month | * | Every month (1–12) |
| Day of Week | 0 | At Sunday |
Detailed Explanation
The cron expression 0 0 * * 0 schedules a task to run once per week, every Sunday at midnight.
Field-by-field breakdown:
0(Minute): At minute 0. The task fires at the start of the hour.0(Hour): At hour 0 (midnight). The task runs at the beginning of Sunday.*(Day of Month): Every day from 1 through 31. No restriction on the day of the month.*(Month): Every month from January through December. No restriction on the month.0(Day of Week): Sunday only. In standard cron, 0 represents Sunday (some systems also accept 7 for Sunday).
This means your task will execute once per week at the start of Sunday. Sunday midnight is one of the lowest-traffic periods for most applications, making it ideal for intensive maintenance operations. Weekly Sunday jobs are commonly used for full backups, log rotation, database optimization, and system-wide cleanup tasks. Note that some cron implementations also accept 7 as Sunday, but 0 is universally supported. This expression is supported by standard cron on Linux/macOS, as well as cloud services like AWS CloudWatch, Google Cloud Scheduler, and GitHub Actions.
Use Case
Ideal for performing weekly full-system backups during the lowest-traffic period to minimize impact on users and maximize backup throughput.
Try It — Interactive Builder
Every Sunday at 12:00 AM
Next 10 Executions
Ctrl+Shift+C to copy expression