This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
cron [2012/02/08 13:38] k2patel created |
cron [2012/02/08 13:50] k2patel [Special Usage] |
||
---|---|---|---|
Line 4: | Line 4: | ||
==== Special Usage ==== | ==== Special Usage ==== | ||
+ | Following Special words replaces common conventional usage | ||
+ | |||
<code bash> | <code bash> | ||
@reboot #Run once, at startup. | @reboot #Run once, at startup. | ||
Line 13: | Line 15: | ||
@midnight #(same as @daily) | @midnight #(same as @daily) | ||
@hourly #Run once an hour, "0 * * * *". | @hourly #Run once an hour, "0 * * * *". | ||
+ | </code> | ||
+ | |||
+ | Following variables you can define in cron as standard environment. | ||
+ | <code bash> | ||
+ | SHELL=/bin/bash | ||
+ | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
+ | MAILTO=root | ||
+ | HOME=/ | ||
+ | </code> | ||
+ | |||
+ | ==== Usage ==== | ||
+ | Most common Usage terms defined as below. | ||
+ | <note tip>when you use "*" it consider all like "* * * * *" considered as every minute of 24/7</note> | ||
+ | <code bash> | ||
+ | # Minute Hour Day of Month Month Day of Week Command | ||
+ | # (0-59) (0-23) (1-31) (1-12 or Jan-Dec) (0-6 or Sun-Sat) | ||
+ | 0 2 12 * 0,6 /bin/sshcheck | ||
</code> | </code> |