| Setting crontab/creating cronjob |
|
|
|
| Written by Websmurf | |
| Thursday, 25 August 2005 | |
|
Just some documentation about how to create a crontab: Open a SSH connection to your server and sign in. At the command line type: vi crontab -e The server will open the crontab file and shows all current entries. Enter "visual" if you're not allready in visual mode" Use the following key combination: Shift + i You will see the cursor move to the first line of the file. Put the cursor at the start of a new line and enter the job. A cronjob typically looks like this: 0 0 * * * perl /home/site/cgi-bin/awstats.pl -update This line means the following: Execute perl /home/site/cgi-bin/awstats.pl -update every day at 0:00. I'll explain a bit more about this: Every line looks like this: 1 2 3 4 5 command 1: minute to run at, * means every minute 2: hour to run at, * means every hour 3: day to run at, * means every day 4: month to run at, * means every month 5: weekdays to run, * for every day replace "command" with the commando you wish to execute at the specified moment. When you're finished adding the jobs, push the Escape button. Then type: :wq press enter to write and save the file. The server will prompt with "Crontab installed" to confirm adding a crontab. |
|
| Last Updated ( Thursday, 25 August 2005 ) |
| < Prev | Next > |
|---|