flashman
← All posts

Cron @daily and @reboot debugging

Debug cron @daily and @reboot jobs by expanding the nickname to five fields, then checking the host daemon timezone and when @reboot actually runs again.

2026-10-14 · 5 min read · Rahul Chitturi

  • cron
  • scheduling
  • operations

Vixie cron accepts nicknames in place of a five-field expression. @hourly is minute 0 of every hour. @daily and @midnight are 00:00. @weekly is Sunday at 00:00. @monthly is midnight on the first. @yearly and @annually are midnight on 1 January. @reboot is not a time at all.

Pasting the nickname into a scheduler that only accepts five fields fails closed, or worse, is interpreted by a different dialect. Expand the nickname in the runbook, then store the five fields in the job definition you will actually run.

Expand the nickname before you argue about the clock

@daily is 0 0 * * *, not every 24 hours from the moment you installed the crontab. If the daemon's timezone is UTC, midnight UTC is the previous evening in the Americas. The nickname hides that choice.

User crontabs and /etc/crontab do not have the same columns. A system crontab has a user field. A nickname line copied from one file into the other shifts every field, and the job runs as the wrong user or not at all.

  • Write the five fields next to the nickname.
  • Name the timezone of the cron daemon.
  • Confirm whether the file has a user column.
  • Preview the next runs from those fields, not from the nickname.

Say what @reboot actually restarts

@reboot runs when the cron daemon starts. It does not run when your application process crashes and is restarted by a supervisor, if crond itself stayed up. It also does not mean container start unless starting the container starts crond.

A @reboot job that needs the network, a mounted volume, or a database will race boot. If it fails once at startup, cron will not retry it on the @daily schedule. Those are two lines, not one nickname doing both jobs.

Preview the expanded schedule in the host zone

Put the five fields into Flashman's cron tool and set the timezone to the daemon's zone, not your laptop's zone. Use the timestamp converter when you compare a log line with midnight. Diff the crontab you edited with the crontab the host loaded. Keep the sentence form of the schedule in a Markdown note beside the nickname.

Leave @reboot and @daily as separate lines when you need both a boot catch-up and a calendar run. One nickname cannot describe both.

Try these tools