Cron: Every Week
0 0 * * 0 runs once a week, at midnight on Sunday — the day-of-week field's 0 refers to Sunday in standard cron. Weekly schedules are common for digest emails, full backups, and maintenance windows that don't need to run more often.
0 0 * * 0
Examples & Variations
Common Mistakes
- Confusing day-of-week numbering — in standard cron, 0 and 7 both mean Sunday, 1 is Monday, and 6 is Saturday. It's easy to be off by one if you assume 0 is Monday.
- Scheduling a weekly job at midnight Sunday without checking whether that's actually a low-traffic window for your specific application.
- Relying on 'every 7 days from deploy' semantics — cron's weekly schedule is always anchored to a specific day of the week, not to a rolling 7-day counter from when the job was added.
Best Practices
- Use the day-of-week field explicitly (0 0 * * 0) rather than trying to approximate weekly behavior with the day-of-month field, which doesn't align to calendar weeks.
- Pick the actual lowest-traffic day and hour for your application rather than defaulting to Sunday midnight out of habit.
- For weekly reports meant for a business audience, consider firing on a weekday morning (like Monday 8 AM) instead of the weekend, so the output is fresh when people check it.
Frequently Asked Questions
- Is 0 0 * * 0 the same as @weekly?
- Yes — @weekly is a standard cron nickname that expands to 0 0 * * 0, firing once at midnight on Sunday.
- How do I run something every week on a day other than Sunday?
- Change the day-of-week field to the number for your desired day: 0 0 * * 1 for Monday, 0 0 * * 5 for Friday, and so on (0=Sunday through 6=Saturday).
- Can cron run something every 2 weeks?
- Not directly with a single day-of-week field — standard cron has no concept of alternating weeks. The common workaround is to check the ISO week number inside the job script and exit early on off-weeks.
Related Tools
Cron Parser
Translate cron expressions to plain English
Cron Cheat Sheet
Quick reference for cron syntax, special characters, and shortcuts
Cron Examples Library
Browse and search common cron expression examples
Cron: Every Day
The cron expression for every day is 0 0 * * *, running once daily at midnight. See daily scheduling examples and best practices.
Cron: Every Month
The cron expression for every month is 0 0 1 * *, running once on the 1st at midnight. See monthly scheduling examples and best practices.
Cron: Every Year
The cron expression for every year is 0 0 1 1 *, running once annually on January 1st. See yearly scheduling examples and best practices.