CRON FILES
/var/spool/cron/crontabs/username
/etc/cron.d/cron.deny, /etc/cron.d/cron.allow Set who to deny and allow
Numbering format is:
n Matches if field value is n
n, p, q matches of field value is n, p,q 10,40 (matches 10 & 40)
n-p Matches field has values between n&p inclusive
* always matches.
Use crontab -e to edit a file. Some systems by default set pico or nano
as the default editor - I prefer vi - to force that, add the following to your .bash_profile if you use bash.
export EDITOR=vi
export VISUAL=vi
Source it:
% source ~/.bash_profile
Edit with crontab -e
Example
minute 0-59
hour 0-23
dayof month 1-31
month 1-12
dayofweek 0-6 0=sunday
0 0 1,15 * * /some/path/to/a/command # whatever on 1st, 15th of the month
10 3 * * 0 /usr/lib/newsyslog # daily at 3:10am
15 17 * * 5 /usr/bin/banner "Time to go" > /dev/console # send out the geeks at 5:15pm on Friday
View crontab file with crontab -l