Skip to content

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.

Cron Expression 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

Field Value Meaning
Minute 0 At minute 0
Hour 0 At midnight (hour 0)
Day of Month * Every day
Month * Every month
Day of Week * Every day of the week

Example Next Run Times

  1. 1. 2026-04-06 00:00
  2. 2. 2026-04-07 00:00
  3. 3. 2026-04-08 00:00
  4. 4. 2026-04-09 00:00
  5. 5. 2026-04-10 00:00

Common Use Cases

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.

Related Cron Expressions

0 12 * * * Daily at Noon 0 9 * * * Daily at 9 AM 0 */12 * * * Every 12 Hours

Related Reading

Cron Expression Guide: Syntax, Examples & Common Schedules → How to Generate UUID v4 in JavaScript →