Cron Every Day at 2 AM

The 2 in the hour field means 02:00, and 0 in the minute field pins it to the top of the hour. With * for the date fields, the job runs at 2:00 AM every day — a popular low-traffic maintenance window.

Cron Expression
0 2 * * *

Field Breakdown

FieldValueMeaning
Minute0At minute 0
Hour2At 02:00 (2 AM)
Day of Month*Every day (1-31)
Month*Every month (1-12)
Day of Week*Every day of the week

Variations

0 2 * * *Every day at 2 AM
0 2 * * 02 AM every Sunday (weekly maintenance)
30 2 * * *Every day at 2:30 AM

Common Use Cases

  • Nightly backups during off-peak hours
  • Database maintenance and reindexing
  • Log rotation and cleanup

Tips & Best Practices

2-4 AM is a common maintenance window because traffic is usually lowest.

Avoid exactly 0 0 (midnight) — many default jobs run then, causing contention.

Watch for daylight-saving transitions, which can skip or repeat the 2 AM hour in some zones.

Related Intervals