If your admin has installed it, just type 'crontab'
Create an empty file called 'mycron' although it can be called anything. Inside the file you need to put some crontab configuration commands like the following:
* * * * * /home/user/blah.sh
Will run blah.sh every minute, on the minute, every day.
I wouldn't suggest doing that tho =)
A more practical example would be:
59 23 * * * /home/user/blah.sh
Which executes blah.sh at 11:59pm every day.
Here's what the *'s mean:
First * - Minute (0-59)
Second * - Hour (0-23)
Third * - Day of month (1-31)
Fourth * - Month of year (1-12)
Fifth * - Day of week (0-6, 0 = sunday)
Also, you must specify a complete path to your script. Simply putting * * * * * blah.sh will not be enough if blah.sh is somewhere different to where crontab is.
Now you're ready to start the cronjob. At the prompt type:
crontab mycron
That's it. To list current jobs type crontab -l.
To edit the cronjob once it's been set, type crontab -e which will launch the default editor, vi, emacs etc.
You can have multiple cronjobs in the one file for running different scripts at different times.
Also, the good thing about crontab is that if your script fails it will email the administrator detailing the error so you know as soon as there's a problem.
Hope this helps,
Tim --
Tim <tim@planetedge.co.uk>