HubTools

Cron Weekly Generator

Pre-loaded with 0 0 * * 0 — fires once a week, Sunday at midnight.

How do you schedule a cron job to run once a week?

0 0 * * 0 fires once a week, at midnight on Sunday — the canonical 'weekly' cron expression and the equivalent of `@weekly` on cron implementations that support nicknames. The fifth field (day of week) uses 0 for Sunday in most implementations: 0 = Sun, 1 = Mon, ... 6 = Sat. Weekly jobs are typical for: aggregating last week's analytics, sending a weekly digest email, rebuilding a search index, or generating a recurring report. Change the trailing 0 to 1 to run every Monday instead.
Minute0-59, * for every, */5 for every 5 minutes
Hour0-23, * for every, */2 for every 2 hours
Day of Month1-31, * for every, 1,15 for specific days
Month1-12, * for every, 1-6 for Jan through Jun
Day of Week0-6 (0=Sunday), * for every, 1-5 for weekdays
Generated Expression

0 0 * * 0

At minute 0 past hour 0 on Sunday
Next 5 Runs:
5/3/2026, 12:00:00 AM5/10/2026, 12:00:00 AM5/17/2026, 12:00:00 AM5/24/2026, 12:00:00 AM5/31/2026, 12:00:00 AM
Cron Reference
FieldRangeSpecialExample
Minute0-59* , - /*/5 = every 5 min
Hour0-23* , - /9-17 = 9 AM to 5 PM
Day of Month1-31* , - /1,15 = 1st and 15th
Month1-12* , - /1-6 = Jan to Jun
Day of Week0-6* , - /1-5 = Mon to Fri
Special Characters
* Any value
, Value list separator
- Range of values
/ Step values
Day of Week Values
0=Sun1=Mon2=Tue3=Wed4=Thu5=Fri6=Sat

About the weekly cron pattern

0 0 * * 0 fires once a week at midnight Sunday in the daemon's local time zone.
  • Field positions: minute hour day-of-month month day-of-week
  • Day-of-week values: 0=Sun, 1=Mon, ... 6=Sat (and 7=Sun on most implementations)
  • Equivalent shortcut: @weekly (Vixie cron extension)
  • To run on a different day, change the last field: 0 0 * * 1 for Monday

Frequently asked questions

Is Sunday 0 or 7 in cron?
Both, depending on the implementation. Vixie cron, cronie, BusyBox, and most modern schedulers accept 0 OR 7 for Sunday — they're equivalent. Quartz cron (used by some Java schedulers) is different: it uses 1=Sunday, 7=Saturday. Always check your scheduler's docs. For maximum portability, use 0 for Sunday.