Concept

What does 0 0 * * * mean?

0 0 * * * means midnight every day — at minute 0 of hour 0, every day of every month, every weekday.

Field by field

PositionFieldValueMeans
1Minute0At minute 0 (top of the hour)
2Hour0At hour 0 (midnight in 24-hour time)
3Day of month*Any day
4Month*Any month
5Day of week*Any day of the week

Putting it all together: at minute 0 of hour 0, every day, every month, every weekday — which simplifies to "midnight, every day."

Equivalent expressions

Several common forms produce the same schedule:

FormSame as
0 0 * * *Explicit form
@dailyMacro (most Linux distros support it)
@midnightMacro alias (less common)

AWS EventBridge and GitHub Actions do NOT support macros — use 0 0 * * * there.

Common similar expressions

ExpressionMeaning
0 0 * * *Midnight every day
0 0 1 * *Midnight on the 1st of every month
0 0 * * 0Midnight every Sunday
0 0 * * 1Midnight every Monday
0 12 * * *Noon every day
0 0 1 1 *Midnight on January 1st (yearly)

Timezone gotcha

"Midnight" means midnight in the system's timezone, which is usually UTC on cloud servers. So 0 0 * * * on AWS / GitHub Actions / most Linux VMs means midnight UTC:

  • 4 PM Pacific (previous day)
  • 7 PM Eastern (previous day)
  • 9 AM Tokyo (same day)

To run at "midnight local time," either set CRON_TZ in your crontab, change the system timezone, or calculate the UTC equivalent of your local midnight.

Related

Continue reading.