Cron expression for every Sunday at midnight
At 00:00, on Sunday.
Five fields for Linux, GitHub Actions and Kubernetes (minute hour day month weekday). Six or seven for Quartz. Nothing you type leaves your device.
What it means and when to use it
This is the schedule the @weekly shortcut stands for: the cron manual and Kubernetes both give 0 0 * * 0 for it. The run happens at the very start of Sunday, which is the same moment as the end of Saturday night. Weekly jobs that are happy with that include a full backup, a database cleanup, or a long-running report that is fine to finish before the week starts.
Watch out for this
Because "Sunday at 00:00" is also "the stroke between Saturday and Sunday", people sometimes argue about which day it belongs to. Cron does not hesitate: day 0 starts at 00:00 on Sunday. If you meant "Sunday night at the end of the weekend", you want Monday at 00:00, which is 0 0 * * 1. Most cron programs accept 7 for Sunday as well, but the GitHub Actions page documents only 0 to 6, so write 0 there.
What each field says
| Field | Written | Means |
|---|---|---|
| Minute | 0 | 0 |
| Hour | 0 | 0 |
| Day of month | * | every day of the month |
| Month | * | every month |
| Day of week | 0 | Sun |
An example of the next runs
If it were Friday 13 November 2026 at 10:20 UTC, the next six runs would be these. Times are shown in UTC and in India time (UTC+5:30).
| UTC | India time |
|---|---|
| Sun 15 Nov, 00:00 | Sun 15 Nov, 05:30 |
| Sun 22 Nov, 00:00 | Sun 22 Nov, 05:30 |
| Sun 29 Nov, 00:00 | Sun 29 Nov, 05:30 |
| Sun 6 Dec, 00:00 | Sun 6 Dec, 05:30 |
| Sun 13 Dec, 00:00 | Sun 13 Dec, 05:30 |
| Sun 20 Dec, 00:00 | Sun 20 Dec, 05:30 |
The same schedule in other places
Quartz
Quartz has a seconds field in front, uses ? in one day field, and counts Sunday as 1:
0 0 0 ? * 1GitHub Actions
Scheduled workflows run in UTC unless you add a time zone. In the workflow file:
on:
schedule:
- cron: '0 0 * * 0'Kubernetes CronJob
In a CronJob manifest the schedule goes in spec.schedule. Without spec.timeZone, it is read in the time zone of the cluster's controller:
spec:
schedule: "0 0 * * 0"
timeZone: "Etc/UTC"A crontab line to copy
The command is made up. Replace it with your own and use full paths:
0 0 * * 0 /home/me/bin/weekly-backup.sh >> /home/me/weekly-backup.log 2>&1Questions
Is @weekly the same as Sunday at midnight?
Yes. The manual lists @weekly as 0 0 * * 0.
This is an independent guide and tool. It is not connected with crontab.guru, Quartz, GitHub, Kubernetes, Spring or the Linux projects named here. Product names belong to their owners.