Short crontab crib info sheet
Put a shell script in one of these folders:
/etc/cron.daily , /etc/cron.hourly , /etc/cron.monthly or /etc/cron.weekly . If these are not enough for you you can add more specific tasks eg. twice a month or every 5 minutes or... go to the therminal and type:
this will open your personal crontab (cron configuration file), the
first line in that file explains it all (don't you think)! In every line
you can define one command to run, and the format is quite simple when
you get the hang of it. So the structure is:
For all the numbers you can use lists eg, 5,34,55 in the first field will mean run et 5 past 34 past and 55 past what ever hour is defined.You can also use intervals, they are defined like this: */20 this example mens every 20th and is in the minutes this will be equivalent to 0,20,40 So to run a command every monday at 5:30 in efternoon will look like this:
or every 15 minutes
Note that the day-of-week goes from 0-6 where 0 = sunday.You can read more here. https://help.ubuntu.com/community/CronHowto |