You are Here:
FAQ
Dedicated Servers
Root Server
HowTo...
Article #1
|
How do I setup a Cron job?Cron jobs can help you to automate certain procedures e.g. backup. This article is a brief "how-to" for creating a cron field which defines when a specific application or script should be executed. Execute the command crontab -e to generate or edit your cron-file. Alternatively use crontab -l for listing your cron jobs or crontab -r for deleting all cron jobs.One line in the cron file looks like this: 1 2 3 4 5 /etc/myScript arguments
The five numbers at the beginning of the line represent the following: 1: minutes (0-59)
This enables you to exactly define when a script is supposed to be started. Wait, there is more! You can make the file even more flexible like this: *: applies every time
Moreover you can define what SHELL is to execute the commands and who you want to send the results to (via e-mail): SHELL=/bin/bash
A few more examples: # every day at 0:05
HintWeekdays and calender days do not exclude each other but are considered separately. If either pattern matches the script will executed.
|
© 2007 1&1 Internet Ltd - About 1&1 Internet