cron crond crontab
cron crond crontab are used as the system scheduler
Your cron jobs
# crontab -l | cut -c -70
System cron jobs
Everyones cron jobs
Edit Jobs
crontab file format
cron jobs run a maximum of once a minute
min hour day month day-of-week command # comment
you can use * to indicate every min/hour/day
you can use - to indicate ranges
you can use / to indicate intervals
examples
* * * * * pwd #every min of every day
*/10 9-17 * * 1-5 pwd # every 10 mins between 9am - 5pm on monday - friday
cron emails
By default cron emails commands output to 'cron' user so if you want email sent elsewhere you have to specify it and prevent any output using STDERR
OutputRedirection (2>&1) (or >& if you also specifing a specific destination)
10 * * * 1-5 pwd 2>&1 | smtp=upstream /usr/local/bin/mailx -s "<subject>" <diffuser@diffdomain>
SystemDefaultCronTab
REFERRERS
SystemServices
There are no comments on this page. [Add comment]