about editing a cron job
Doing a backup job in the night is usually done by writing a small shell script .. i used to do that , anyway i donot know what procedure you are going to follow , anyway you need to have a script atleast if you are not trying to do it through system calls, anyway abt firing that script you need to write a cron , when you are logged into ur login , issue crontab -e .. this will open a file looking very much like a file in vi editor ... write
0 22 * * * /path/to/your/script_of_backup this means the backup script will run every day , every week , every month at exactly 22:hrs in the night ....
Be careful with crontab -r .. it deletes without a warning
abt some informal discussion ... the general syntax of writing this :
(minutes) (hrs) (day_of_month) (month) (day_of_week) which takes inputs in the form (0-59) (0-23) (1-31) (1-12) (0-6) respectively
Thus :
0 1 * * 1-5 command (will run every monday-friday at 1 am)
0 1 * * 1,3,5 command (will run every mon,wed,fri at 1 am)
10 2 1 * * command (will run at 2:10 am on the first of every month)
0 1 1 1 * command (will run at 1 am on January 1 every year)
Just pure calculation nothing else .. do let me know if it works
Best of luck
Shaheen
|