
10-26-2006
|
|
Registered User
|
|
|
Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,416
|
|
The syntax of the second field is invalid : */4
You must indicate the hours explicitly
Code:
0 0,4,8,12,16,20 * * * /home/location/scriptname
From crontab man page
Quote:
The crontab File Entry Format
A crontab file contains entries for each cron job. Entries are separated by
newline characters. Each crontab file entry contains six fields separated by
spaces or tabs in the following form:
minute hour day_of_month month weekday command
These fields accept the following values:
minute 0 through 59
hour 0 through 23
day_of_month 1 through 31
month 1 through 12
weekday 0 through 6 for Sunday through Saturday
command a shell command
You must specify a value for each field. Except for the command field, these
fields can contain the following:
o A number in the specified range. To run a command in May, specify 5 in the
month field.
o Two numbers separated by a dash to indicate an inclusive range. To run a
cron job on Tuesday through Friday, place 2-5 in the weekday field.
o A list of numbers separated by commas. To run a command on the first and
last day of January, you would specify 1,31 in the day_of_month field.
o An * (asterisk), meaning all allowed values. To run a job every hour,
specify an asterisk in the hour field.
Note: Any character preceeded by a backslash (including the %) causes that
character to be treated literally. The specification of days may be made by
two fields (day of the month and day of the week). If you specify both as a
list of elements, both are adhered to. For example, the following entry:
0 0 1,15 * 1 command
would run command on the first and fifteenth days of each month, as well as
every Monday. To specify days by only one field, the other field should
contain an * .
|
Jean-Pierre.
|