Run a Cron Job Every Day at 3 AM
To run a job every day at 3:00 in the morning, use 0 3 * * *. This is a popular window for backups and maintenance because traffic is low.
The expression
0 3 * * * runs at 03:00 every day. Minute 0, hour 3, all other fields wildcard.
Why 3 AM
Backups, log rotation, and cache warming are often scheduled in the early morning when the system is idle. If many servers share a backend, stagger them so they don't all hit at 03:00 exactly.
Add a random delay
To avoid a thundering herd, sleep a random amount first: 0 3 * * * sleep $((RANDOM \% 1800)); /path/backup.sh spreads the start across a 30-minute window.
FAQ
What is the cron expression for 3 AM daily?
0 3 * * * runs every day at 03:00. The 3 is the hour and the leading 0 is the minute.
Why do people schedule jobs at 3 AM?
It is a low-traffic window good for backups, log rotation, and maintenance that you don't want competing with daytime load.
How do I stagger many 3 AM jobs?
Prefix the command with sleep $((RANDOM % 1800)) to spread starts across a 30-minute window and avoid a thundering herd.