[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Howto add a crontab job ?



W.D.McKinney wrote:
Hi Chris,

Thanks. man crontab doesn't tell me what the syntax is for a "every 5
minute"
job though, and that's what I need. Any other ideas ?

Dee


I use crontab -e to edit my personal crontab. The format that you are looking for is:


* * * * * <command> \n

The first star is the minutes: every 5 minutes would be 0-59/5 or 0,5,10,15,20,25,30,35,40,45,50,55

The second star is the hours:  every hour is *

The third star is day of the month

The fourth star is month of the year

The fifth star is day of the week: Sunday is both 0 and 7.

The \n means that every line must end with a new line.

So every five minutes is something like:

0-55/5 * * * * <command> \n



Reply to: