What does this cron expression actually do?

Paste a crontab line to get it in plain English, field by field, plus the next five times it will fire — so a misplaced asterisk is obvious before it reaches production.

Gotchas

Three cron behaviours that cause real incidents.

Day-of-month and weekday are OR, not AND

If both fields are restricted, cron runs when EITHER matches. “0 0 13 * 5” fires on the 13th and on every Friday — not only on Friday the 13th. This surprises almost everyone once.

It runs in the server’s timezone

Cron uses the system timezone unless CRON_TZ or TZ is set in the crontab. Daylight saving can make a job run twice or not at all on the changeover day.

Ranges with steps start at the range beginning

“0-30/10” gives 0, 10, 20, 30 — not 10, 20, 30. And “*/7” on minutes gives 0, 7, 14 … 56, then jumps back to 0, so the gap across the hour boundary is only 4 minutes.

Found something you’d rather not fix yourself?

Configuring DNS, TLS and email authentication properly — without breaking live traffic — is part of our cybersecurity and managed services work.

Talk to an engineer