Cron Jobs Usage
=================================================
1. Create a Script that you want to run as a CronJob
2. Assign the Script for the CRONTAB
(CRONTAB would be differ from each user. So if you want to create
a tab for the other user log-on as that user)
crontab -e ==> Command to edit the crontab
-e (edit user's crontab)
-l (list user's crontab)
-r (delete user's crontab)
3. Crontab Syntax:
crontab [ -u user ] file
<MIN> <HOUR> <DAY_OF_WEEK> <MONTH> <YEAR> <SCRIPT_NAME>
4. Examples
30 9-17 * 1 sun,wed,sat echo `date` >> /date.file 2>&1
At half past the hour, between 9 AM and 5 PM, for every day of January
which is Sunday, Wednesday or Saturday, append date to file date.file
0 23-7/2,8 * * * date
Every two hours from 11p.m. to 7a.m., and at 8a.m.
0 4 1 jan * date
4:00 a.m. on january 1st
To take the physical database backup every day:
15 23 * * * /home/z755692/scripts/makeDbBackup.sh >> /tmp/DBBACKUP/bkup.log
Reference:
==========
http://www.pantz.org/os/linux/programs/cron.shtml