May
10
There are several special entries, some which are just shortcuts, that you can use instead of specifying the full cron entry. The most useful of these is probably @reboot which allows you to run a command each time the computer gets reboot. You can alert yourself when server is back online after a reboot. Also becomes useful if you want to run certain services or commands at start up.The complete list of special entries are:
| Entry | Description | Equivalent To |
|---|---|---|
| @reboot | Run once, at startup. | None |
| @yearly | Run once a year | 0 0 1 1 * |
| @annually | (same as @yearly) | 0 0 1 1 * |
| @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) | 0 0 * * * |
| @hourly | Run once an hour | 0 * * * * |
The most useful again is @reboot. Use it to notify you when your server gets rebooted!
Comments
8 Comments so far







linux only!
won’t work on solaris, aix,, hp-ux.
More like ISC cron. That is not Linux-only.
Cool stuff, didn’t know about it. I’ll try to use it, tnx for the tip
Cool stuff! Too bad I use cron heavily in a Solaris environment (8 & 10), and these don’t apply.
Still, they are cool, and I learned something today.
[…] Read More […]
For those running Solaris, couldn’t you replace your native cron for the ISC verssion used by Linux?
A few years ago I used to replace several HP-UX utilities, bash, cc, grep, etc. with the GNU versions.
[…] Neat crontab tricks : lxpages.com blog. I never knew about these special cases–that @reboot option is quite cool… […]
Women celebrities exposed….
Free nude celebrities. Celeb blogging nude celebrities. Celebrities nude. Free nude male celebrities. Naked celebrities….