Cron: every week
Midnight at the start of Sunday, once a week. @weekly is the same expression, and 0 0 * * 7 is too, since both 0 and 7 mean Sunday.
Open in Cron Parser The expression is filled in: change it and watch the next runs.
Expression
0 0 * * 0 Meaning
At 00:00 on Sunday
Next 5 runs
Your time zone
The same schedule on other platforms
| Platform | Written as | Note |
|---|---|---|
| Linux crontab | 0 0 * * 0 | Five fields, in the server's local time zone. A % in the command has to be escaped as \%. |
| GitHub Actions | - cron: '0 0 * * 0' | Five fields, in UTC unless a timezone (an IANA name such as Europe/Warsaw) is set next to cron. Default branch only. The shortest interval is 5 minutes; when GitHub is busy, runs start late and some are dropped. |
| Kubernetes CronJob | schedule: "0 0 * * 0" | Five fields, in the controller's time zone unless spec.timeZone is set (Kubernetes 1.27 and later). concurrencyPolicy decides what happens when runs overlap. |
| systemd timer | OnCalendar=Sun 00:00 | Not weekly: in systemd that means Monday at 00:00. |
| AWS EventBridge | cron(0 0 ? * SUN *) | Six fields, the last one the year; one day field must be ?, and day of week 1 is Sunday. Rules run in UTC; EventBridge Scheduler accepts a time zone. |
| Quartz / Spring | 0 0 0 ? * SUN | Six fields, seconds first. Quartz needs ? in one of the day fields and counts Sunday as 1; Spring accepts ? and numbers days like cron. |
Common mistakes
systemd's weekly is Monday
cron's
@weeklyruns on Sunday, while systemd'sOnCalendar=weeklyruns on Monday. Moving a job from one to the other shifts it by a day unless you write the day out.A week that starts on Monday
Use
0 0 * * 1for Monday at 00:00, the start of the week in most of Europe and in ISO 8601.At the end of the week
Midnight at the start of Sunday is also the last moment of Saturday. For a job that closes the week on Sunday evening,
0 23 * * 0(Sunday 23:00) is often what people mean; for Saturday night,0 23 * * 6.