CentOS and Fedora Linux use a set of directories in /etc to control when jobs run.
These directories take the following form:
/etc/cron.hourly â€“ jobs that run once per hour
/etc/cron.daily â€“ jobs that run once per day
/etc/cron.weekly â€“ jobs that run one per week
/etc/cron.monthly â€“ jobs that run once per month
The jobs that you start something like
/sbin/yumÂ -yÂ update
or running a script some where in your machine
or syncrionize with remote host with Rsync commands
The other way is to add these jobs via Crontab commands :
crontab -e Edit your crontab file, or create one if it doesnâ€™t already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file. (This option is only available on a few systems.)
and add the line like
* * * * * command to be executed
– – – – –
| | | | |
| | | | +—– day of week (0 – 6) (Sunday=0)
| | | +——- month (1 – 12)
| | +——— day of month (1 – 31)
| +———– hour (0 – 23)
+————- min (0 – 59)
00 06 * * * rm /home/pirat9/tmp/*
Thats mean every day at 6 in the morning remove the tmp files in my directory
If you need any other help, please post it on the Forums
Related Articles By Tags: