Run a Cron Job Every Day at Midnight

Cron expression to run a job once per day at midnight (00:00). The most common daily cron schedule.

Cron Expression
0 0 * * *
Every day at 12:00 AM

Field-by-Field Breakdown

FieldValueMeaning
Minute00
Hour00
Day of Month*every day of month
Month*every month
Day of Week*every day of week

0 0 * * * is the daily anchor for almost every batch system — exports, archives, daily emails, financial cutoffs, log rotations all converge on the midnight boundary. The reason is operational, not technical: business day rollover is the natural seam for accounting, the lowest-traffic window for resource-heavy work, and the moment downstream systems expect 'yesterday' to be a closed bucket.

When teams reach for this schedule

Daily report email or digest

Summarizing the previous day's events and emailing them at 00:00 lets the inbox be ready by the time the team logs in. The actual send time should be timezone-aware — a midnight UTC send arrives at 8 PM ET, which is fine for nightly digests but wrong for morning standups.

End-of-day accounting close

Closing the books at midnight UTC gives every customer the same 24-hour invoice window regardless of their local clock. Pair this with idempotent close logic so a retry never double-counts.

Log rotation, archive, and TTL cleanup

Daily archival of yesterday's logs to cold storage, plus deletion of anything past your retention window, keeps storage costs bounded. Midnight is the moment when 'yesterday' is fully closed and safe to compress.

What to watch for

  • 'Midnight' is the start of the day, not the end. 0 0 * * * on the 5th fires at 00:00 on the 5th — meaning it processes data from the 4th. Pick your date arithmetic accordingly.
  • Timezones matter more here than at almost any other cadence. A midnight-UTC job is midnight in London, 7 PM previous day in New York, and 5:30 AM in India. State the timezone in the job name.
  • Many systems share the midnight slot — your cloud provider, your CI, your monitoring, your competitors. If your job pulls from a shared external API, expect rate-limit pressure right at 00:00 UTC. Offset by 5–10 minutes to dodge the rush.
  • @daily and @midnight are common shortcuts for 0 0 * * *. Both are supported by classic crond but not by every managed scheduler — use the explicit form for portability.

Next 5 Scheduled Runs

Computed in UTC. Use the generator to compare UTC with your browser-local time.

  1. 1Thu, Jun 4, 2026, 12:00 AM
  2. 2Fri, Jun 5, 2026, 12:00 AM
  3. 3Sat, Jun 6, 2026, 12:00 AM
  4. 4Sun, Jun 7, 2026, 12:00 AM
  5. 5Mon, Jun 8, 2026, 12:00 AM

Schedule this with TrigRun

Deploy this cron schedule in seconds. Automatic retries, encrypted secrets, full execution history, and native MCP support for AI agents.

Start Scheduling — Free

0 0 * * *

Frequently Asked Questions

What is the cron expression for every day at midnight?

0 0 * * * runs once per day at 00:00. The first 0 is the minute, the second 0 is the hour.

What timezone does the cron expression use?

TrigRun evaluates cron expressions in UTC. Use the dashboard preview to compare UTC with your browser-local time before saving.

What is the difference between 0 0 * * * and @daily?

They are equivalent in classic cron. @daily (and @midnight) are aliases for 0 0 * * *. Some managed schedulers and cloud providers don't support the @ shortcuts, so the explicit five-field form is the safer default.