CronTools

Cron pattern

Cron Expression for Every Sunday

0 9 * * 0 runs a job at 9:00 AM every Sunday. Sundays are position 0 in the day-of-week field — here is why, and when the next runs happen.

0 9 * * 0

This schedule fires on the pattern shown above; see the field-by-field breakdown below.

Next 5 run times

Computed in your browser, in your local timezone.

  1. your local time
  2. your local time
  3. your local time
  4. your local time
  5. your local time

Why Sunday is 0

A cron expression has five fields — minute, hour, day of month, month, day of week. In 0 9 * * 0 the last field carries the schedule:

Cron numbers weekdays from 0 (Sunday) to 6 (Saturday) — a heritage of the C library's time.h, where the epoch-aligned calendars also start weeks on Sunday. For most other languages the week starts on Monday (index 1), which is why Sunday's cron index of 0 regularly trips people up. The equivalent names SUNSAT are accepted by most daemons, so 0 9 * * SUN means the identical schedule.

Sunday maintenance windows

Sunday morning is the traditional quiet window for weekly maintenance: full database backups before the business week, log pruning, index rebuilds, cache warmers and long-running regression suites. A 9 AM start keeps the job inside support hours rather than the 3 AM slot, which makes noisy failures easier to catch. For genuinely huge jobs, many teams instead pick 0 2 * * 0 to run while traffic is at its weekly low.

Gotchas and related patterns

Watch out for the 7 alias: most cron implementations let you write the day-of-week field as 0 or 7 for Sunday, so 0 9 * * 7 is legal too, but 0-6 and 1-7 are not interchangeable — ranges are evaluated against the numeric values above. If you need both weekend days, the list syntax 0,6 covers Saturday and Sunday. For the opposite side of the week, see the every-Monday expression and the Mon–Fri weekday schedule. A monthly Sunday ritual would instead use the first day of month expression. All five fields are documented in the complete cron syntax guide.

Understanding the syntax of 0 9 * * 0

In plain English, this schedule at 9:00 am, on sunday. Here is each of the five fields and what it controls:

Field Value Meaning
Minute 0 at minute 0
Hour 9 at 9:00 AM
Day of month * every day of the month
Month * every month
Day of week 0 on Sunday

The expression has five space-separated fields: minute hour day-of-month month day-of-week. Any field set to * means “every”.

Explore more cron patterns

Fine-tune your schedule with a related pattern, or start from scratch in the builder.