# Run a Cron Job Every Day at 2 AM

> The cron expression for every night at 2 a.m. is 0 2 * * *. Why 2 a.m. suits backups, how daylight saving can skip or repeat it, and safer variations.

```
0 2 * * *
```

In plain English: At 02:00, every day.

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.

## 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 zones
- `0 2 * * 0` — weekly instead: Sundays at 02:00
- `17 2 * * *` — 02:17 — avoids colliding with everything else scheduled on the hour

## FAQ

### 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.

## Related schedules

- [0 0 * * * — Run a Cron Job Every Day at Midnight](https://www.devkult.com/cron/every-day-at-midnight.md)
- [0 0 * * 0 — Run a Cron Job Every Sunday](https://www.devkult.com/cron/every-sunday.md)
- [0 6 * * * — Run a Cron Job Every Day at 6 AM](https://www.devkult.com/cron/every-day-at-6am.md)

Open the interactive page: https://www.devkult.com/cron/every-day-at-2am