How to Schedule Tasks in crontab
Marc-Antoine Ross April 12th, 2006
Another simple post, more a reminder again. First, login to the Unix server through SSH.
Here are a few usefull commands:
crontab -l list the tasks
crontab -e edit the tasks
crontab -r delete the crontab file
To start editing the tasks, you enter in edit mode with crontab -e. It will open your default editor. You can alter scheduled tasks or enter new ones. The format is like that:
* * * * * ~/path_to_script/script.sh
The stars are for minute, hour, day of month, month, day of week. A star means all legal values for this column. You can specify a single number, a list of elements separated by commas, a range (ie: 20-30).
The following example will run once an hour at every 30th minute.
30 * * * * ~/path_to_script/script.sh
Entry Filed under: Unix, Server


Leave a Comment
Some HTML allowed
Trackback this post | Subscribe to the comments via RSS Feed