Run a Cron Job Every Day at 2 AM
0 2 * * * runs nightly at 02:00 — the classic slot for backups, database maintenance and cleanup jobs, when traffic is low and the midnight batch has usually finished. There's one catch: in many time zones the daylight-saving change happens around 02:00, so the job can be skipped or run twice on those two nights a year.
0 2 * * *In plain English: At 02:00, every day.
Field by field
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | 0 |
| Hour | 2 | 2 |
| Day of month | * | every day |
| Month | * | every month |
| Day of week | * | every weekday |
Variations
30 3 * * *03:30 — clear of the daylight-saving change in most zones0 2 * * 0weekly instead: Sundays at 02:0017 2 * * *02:17 — avoids colliding with everything else scheduled on the hourTweak any of these in the crontab explainer to see the schedule in plain English and its next run times.
Frequently asked questions
What happens to a 2 a.m. job when the clocks change?
In the US, clocks jump from 02:00 to 03:00 in spring and repeat 01:00–02:00 in autumn. Depending on the cron implementation, jobs in that window can be skipped or run twice. Run servers in UTC, or schedule outside 01:00–03:00.
Why not schedule everything at midnight?
Every default schedule lands there — log rotation, backups, certificate renewals. Spreading jobs through the night stops them competing for CPU and disk.
New to cron syntax? Read Cron Expressions Explained, Field by Field. Job not firing? Work through Cron Job Not Running? 10 Things to Check.