Daily at Midnight
Runs the job once per day at midnight (00:00). This is the most common schedule for daily maintenance tasks such as database backups, log rotation, and daily report generation. The job executes at the start of each new day according to the server's timezone.
0 0 * * * What is the cron expression for Daily at Midnight?
The cron expression for Daily at Midnight is 0 0 * * *. This five-field cron schedule uses the format minute, hour, day-of-month, month, and day-of-week. Runs the job once per day at midnight (00:00). This is the most common schedule for daily maintenance tasks such as database backups, log rotation, and daily report generation. The job executes at the start of each new day according to the server's timezone. Common use cases include database backups and log rotation.
Field Breakdown
Example Next Run Times
- 1.
2026-04-06 00:00 - 2.
2026-04-07 00:00 - 3.
2026-04-08 00:00 - 4.
2026-04-09 00:00 - 5.
2026-04-10 00:00
Common Use Cases
- ✓ Database backups
- ✓ Log rotation
- ✓ Daily report generation
- ✓ Data archival
Frequently Asked Questions
Is 0 0 * * * the same as @daily?
Yes, most cron implementations support the @daily shorthand, which is equivalent to 0 0 * * *. Other shorthands include @hourly (0 * * * *), @weekly (0 0 * * 0), @monthly (0 0 1 * *), and @yearly (0 0 1 1 *).
What timezone does midnight refer to?
The server's system timezone. If your server runs in UTC but you need midnight in US Eastern time, you would use 0 5 * * * (or 0 4 * * * during DST) to account for the offset.
Should I avoid scheduling many jobs at midnight?
Yes, midnight is the most popular cron time, which can cause resource spikes. Consider staggering jobs by a few minutes (e.g., 5 0 * * *, 10 0 * * *) to distribute the load.