The daily midnight schedule
A cron every day at midnight schedule fires once every 24 hours, at minute 0 of hour 0. It is the
default cadence for reports, backups, cleanups and anything else that thinks in calendar days.
Crontab accepts three spellings — the five explicit fields and the two shortcuts @daily and
@midnight — and expands all of them to the same thing. The panel above starts on the explicit
form, because that is the one you can move.
Midnight belongs to the machine, not to you
The schedule is evaluated against the system clock of whatever runs the daemon. In a container that is UTC unless somebody deliberately changed it, and nobody usually did. A job written by someone in London during summer, meaning local midnight, runs at 01:00 local time; the same line written in São Paulo runs at 21:00 the previous day. Nothing in the crontab hints at this, and the job appears to work.
Two approaches survive review. Set the timezone explicitly on the unit or container so the schedule means what it reads, or accept UTC everywhere and write the line in UTC deliberately, converting when you read the logs. What does not survive is assuming the host agrees with your laptop.
The two nights a year that are not 24 hours long
Where a daylight saving transition lands at midnight, one calendar day has no midnight and another has it twice. Vixie cron handles the two cases asymmetrically: a job skipped by the spring gap is run once shortly afterwards, and a job that would repeat in the autumn overlap is run only once. That is reasonable behaviour, but it is a property of one implementation, and the systemd timers, Kubernetes controllers and hosted schedulers you might migrate to make their own choices.
If the job is idempotent, none of this matters. If it charges a customer or closes a ledger, move it away from the transition hour and write down why.
Why five past is the better default
Midnight is the most crowded minute in any estate. Every daily backup, every log rotation, every certificate check and every other job whose author also reached for the obvious number starts on the same tick. The disk queue spikes, the runs take longer than they did in testing, and the failure shows up as an unexplained slowdown once a night.
Minute 5 is empty, and the variants above include it alongside the weekday-only form and a run placed before the date rolls over, which is the version you want when the job reports on the day that is ending rather than the one beginning.
Related cadences
If daily is too coarse, an hourly job is the usual next step up. If the work is really a monthly close, the monthly schedule says so more clearly than a daily job with a date check inside it. Either way, read the line back in the cron expression generator before you install it.