Cron: Every Day
0 0 * * * runs once a day, at midnight — the default "daily" schedule used for backups, batch reports, and nightly maintenance across almost every platform that supports cron. Both the minute and hour fields are pinned to 0, and every other field stays wildcarded.
0 0 * * *
Examples & Variations
Common Mistakes
- Assuming "midnight" is the same moment everywhere — a daily cron job on a UTC server fires at a different local time than one on a server set to your timezone.
- Scheduling every heavy daily job at exactly midnight, causing a resource spike when backups, reports, and cleanup jobs all compete for CPU and I/O at the same second.
- Not accounting for daylight saving time: a job scheduled in local time can run twice, or not at all, on the two days a year clocks change.
Best Practices
- Stagger daily jobs across quiet hours (e.g. 1 AM, 2 AM, 3 AM) instead of stacking them all at midnight.
- Run cron in UTC on servers when the exact wall-clock time doesn't matter to users, to sidestep DST entirely.
- For genuinely user-facing "once a day" behavior (like a digest email), pick a time in the user's local timezone explicitly rather than relying on server time.
Frequently Asked Questions
- Is 0 0 * * * the same as @daily?
- Yes — @daily (and its alias @midnight) is a standard cron nickname that expands to exactly 0 0 * * *, supported by most Linux cron daemons.
- How do I run a daily job at a specific time other than midnight?
- Change the hour and minute fields directly — 0 6 * * * runs daily at 6:00 AM, 30 14 * * * runs daily at 2:30 PM.
- Does 'every day' mean all 7 days including weekends?
- Yes, 0 0 * * * runs all 7 days since the day-of-week field is wildcarded. Restrict it to weekdays with 0 0 * * 1-5 if weekends should be excluded.