Crontab – @reboot and other shortcuts

by

in

I discovered a handy crontab feature today. If you use @reboot instead of the typical five fields, it will run the command at startup. There are several other useful options:

Instead of the first five fields, one of eight special strings may
appear:

string meaning
------ -------
@reboot Run once, at startup.
@yearly Run once a year, "0 0 1 1 *".
@annually (same as @yearly)
@monthly Run once a month, "0 0 1 * *".
@weekly Run once a week, "0 0 * * 0".
@daily Run once a day, "0 0 * * *".
@midnight (same as @daily)
@hourly Run once an hour, "0 * * * *".