Cron Every Sunday (Weekly)
Every Sunday is 0 in the day-of-week field (7 also works in Linux cron). At midnight it is exactly what @weekly means.
minute · hour · day · month · weekday
Build it with controlsWeekly at 00:00 · 1 days
In plain English
At midnight every Sunday.
Tap a field to see what it means.
- Next run
- —
- Usually every
- —
- Time zone
- Yours
Convert to another schedulerQuartz, Spring, AWS, GitHub Actions, Kubernetes
| Standard cron | 0 0 * * 0 | current |
|---|---|---|
| Quartz | 0 0 0 ? * SUN | |
| Spring | 0 0 0 * * SUN | |
| AWS EventBridge | cron(0 0 ? * SUN *) | |
| GitHub Actions | 0 0 * * 0 | |
| Kubernetes | 0 0 * * 0 |
About Standard cronTime zone, day numbering, daylight saving
- Runs in the machine’s local time zone; cronie also reads CRON_TZ at the top of the crontab.
- Five fields, then the command. Day of week is 0–7 (0 and 7 are Sunday) or SUN–SAT; months 1–12 or JAN–DEC.
- When both day fields are set, a day that matches either one runs.
- Daylight saving: a job at a fixed time in a skipped hour runs right after the change, and one in a repeated hour runs once. Jobs with * in the minute or hour follow the clock.
Sources: crontab(5), cronie, cron(8), cronie, POSIX crontab.
How this works: Method, 10 sources,
How this works
Method
The expression is read field by field with the rules of the scheduler you pick (ranges, lists, steps, names, @ macros, and L, W and # where it has them) into the values each field allows. The next runs come from stepping forward through the calendar in the chosen time zone, day by day and then time by time, using that scheduler’s rule for when both day fields are set and its documented rule for daylight saving (where it has none, a skipped time is skipped and a repeated one runs once). A conversion to another scheduler is parsed back and checked against the original before it is shown.
Sources
Changes
- First version: plain English and the next runs for six schedulers, a builder, conversion between them, and 20 pages for common schedules.
Worked example: 0 0 * * 0
Say the clock reads Tuesday 5 January 2027, 8:00 PM UTC. 0 0 * * 0 means “at midnight every Sunday”, so the next five runs are Sunday 10 January 2027, 12:00 AM, Sunday 17 January 2027, 12:00 AM, Sunday 24 January 2027, 12:00 AM, Sunday 31 January 2027, 12:00 AM and Sunday 7 February 2027, 12:00 AM.
In UTC, where no clock change interrupts it, that comes to 1 run a week and 52 in 2027.
@weekly, spelled out
0 0 * * 0 runs at midnight at the start of every Sunday. It is exactly what @weekly stands for in Linux cron, Kubernetes and Spring.
Linux cron accepts both 0 and 7 for Sunday, so 0 0 * * 7 is the same line. Kubernetes and GitHub Actions document only 0, and Kubernetes rejects 7, so 0 or SUN is the portable choice.
Quartz and AWS count Sunday as 1: the same weekly job is 0 0 0 ? * SUN in Quartz and cron(0 0 ? * SUN *) in AWS. Writing SUN avoids getting the number wrong.
Pitfalls
- 7 for Sunday works in Linux cron and Spring but is an error in Kubernetes.
- In Quartz and AWS, 0 isn’t a valid day of week, and 7 means Saturday.
- “Midnight Sunday” is the start of Sunday, not the end of it; for the end of the weekend use 59 23 * * 0 or 0 0 * * 1.
- @weekly runs once a week, i.e. “0 0 * * 0”. Source: crontab(5), cronie.
- Spring’s macros include @weekly for 0 0 0 * * 0, and Spring accepts 0 or 7 for Sunday. Source: Spring CronExpression.
“Every Sunday” in every scheduler
The same schedule written for each scheduler, converted and checked by this tool. A dash means that scheduler can’t express it in one expression; the note says why.
| Scheduler | Expression | Note |
|---|---|---|
| Standard Unix cron (Vixie cron, cronie) | 0 0 * * 0 | |
| Quartz Scheduler (Java) | 0 0 0 ? * SUN | |
| Spring Framework @Scheduled | 0 0 0 * * SUN | |
| Amazon EventBridge cron() | cron(0 0 ? * SUN *) | |
| GitHub Actions schedule | 0 0 * * 0 | |
| Kubernetes CronJob | 0 0 * * 0 |
Frequently Asked Questions
Is @weekly the same as 0 0 * * 0?
Yes: midnight at the start of Sunday, in Linux cron, Kubernetes and Spring. GitHub, Quartz and AWS need the fields written out.
Is Sunday 0 or 7?
Both, in Linux cron and Spring. Kubernetes and GitHub use 0. Quartz and AWS use 1. SUN works everywhere.
How do I run on Sunday evening?
Set the hour: 0 18 * * 0 runs at 6 PM every Sunday.