Cron special strings: @reboot, @daily, @hourly and when to use them
@reboot is the one special string genuinely worth using because it has no numeric equivalent. @daily and friends work on Vixie cron, cronie, and standard BusyBox builds from 1.27 onward. Explicit expressions are still easier to move across custom builds and different cron implementations.
Most cron daemons support eight special strings as shorthand for common schedules: @reboot, @yearly, @annually, @monthly, @weekly, @daily, @midnight, and @hourly. They're easier to read than numeric expressions but hide important details about exactly when the job runs.
By TechCompare · Updated
How this is calculated
@reboot runs once at system startup. It's uniquely useful because there's no numeric cron expression for run once after boot. @daily and @midnight both expand to 0 0 * * *. @hourly expands to 0 * * * *. @weekly expands to 0 0 * * 0. @monthly expands to 0 0 1 * *. @yearly and @annually both expand to 0 0 1 1 *. Vixie cron and cronie support these strings. BusyBox crond has also supported them through FEATURE_CROND_SPECIAL_TIMES since version 1.27, and that feature defaults to enabled. Custom builds can turn it off, and macOS uses launchd rather than cron by default, so explicit 5-field expressions remain the safest portable form.
Verdict
The eight shortcut strings (@reboot, @yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourly) work on Vixie cron and cronie. BusyBox crond supports them when FEATURE_CROND_SPECIAL_TIMES is enabled, which has been the default since version 1.27. macOS uses launchd instead. @reboot is the lone shortcut with no numeric equivalent. For scripts that cross different systems or custom builds, explicit five-field expressions remain the portable choice.
More Cron scenarios
Related guides
Frequently asked questions
What does @reboot do in cron?
What does @daily expand to in cron?
Do cron special strings like @daily work in Docker containers?
Related tools
Unix Timestamp
Convert between Unix timestamps and human-readable dates.
Use tool ➜CHMOD Configurator
Calculate Linux file permissions using checkboxes or octal numbers, then view the matching symbolic notation.
Use tool ➜Text Encoding Converter
Convert between Text, Base64, Binary, Hexadecimal, and Decimal formats.
Use tool ➜