# Run a Cron Job Every Day at Midnight

> The cron expression for every day at midnight is 0 0 * * *. Field-by-field meaning, next run times, and why midnight can be a crowded slot.

```
0 0 * * *
```

In plain English: At 00:00 (midnight), every day.

0 0 * * * pins the minute and hour to zero and leaves the rest as wildcards: once a day at 00:00. It's the canonical nightly schedule for backups, log rotation, and daily aggregation — and also the single most congested minute of the day on shared systems.

## Field by field

| Field | Value | Meaning |
|---|---|---|
| Minute | `0` | 0 |
| Hour | `0` | 0 |
| Day of month | `*` | every day |
| Month | `*` | every month |
| Day of week | `*` | every weekday |

## Variations

- `23 1 * * *` — nightly at 01:23 — a quieter slot than exactly midnight
- `0 0 * * 1-5` — midnight on weekdays only
- `0 12 * * *` — daily at noon instead

## FAQ

### Is 0 0 * * * the same as @daily?

Yes — most cron implementations accept @daily (and @midnight) as an alias for 0 0 * * *. The five-field form works everywhere, including schedulers that don't support @ shortcuts.

### What happens during daylight-saving changes?

Midnight usually exists on both DST transition days, but jobs scheduled between 01:00 and 03:00 can be skipped or run twice depending on the direction of the shift and your cron implementation. Keep critical nightly jobs outside the DST window or run them in UTC.

## Related schedules

- [0 9 * * * — Run a Cron Job Every Day at 9 AM](https://www.devkult.com/cron/every-day-at-9am.md)
- [0 */12 * * * — Run a Cron Job Every 12 Hours (Twice a Day)](https://www.devkult.com/cron/every-12-hours.md)
- [0 0 1 * * — Run a Cron Job on the First of Every Month](https://www.devkult.com/cron/first-of-month.md)

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