1819788 Members
3562 Online
109607 Solutions
New Discussion юеВ

crontab error

 
SOLVED
Go to solution
mpaschali_1
Occasional Advisor

crontab error

Hi all,

I am running HPUX 11.0. I have tried to edit the crontab file. "crontab -e" as the user root.
However, when I close and save the file I get the following error message "crontab: error on previous line; number out of bounds."

Anyone seen this before? Anyone know how to fix it?

Thanks in advance

maria
4 REPLIES 4
Sridhar Bhaskarla
Honored Contributor
Solution

Re: crontab error

Check your fields and their ranges.

minute hour monthday month weekday command

minute -> 0-59
hour -> 0-23
monthday -> 1-31 (but dependent on month below)
month -> 1-12
weekday -> 0-6

See if you have gone out of range on any of the fields.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Rainer von Bongartz
Honored Contributor

Re: crontab error

You entered a wrong value for one of the fields in your crontab.
i.e. a minute with value 66 or an hour with value 26

Check and correct your values

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
mpaschali_1
Occasional Advisor

Re: crontab error

Thanks.

I realised my error after I published it.
I think I am getting tired.
Magdi KAMAL
Respected Contributor

Re: crontab error

Hi mpaschali,

You may verify the values of first 5 columns :

First column : 0-59 minutes
Second column : 0-23 hours
Third column : 1-31 day in month
Forth column : 1-12 Month
Fifth column : 0-6 weekday ( 0 is Sunday ).

Notice:
1. Star "*" in column, instanciates all values for that interval.
2.You still can give for each column, a list of values separated by comma. Like :

0,15,30,45 8,12,16,20 1,11,21,31 * * Command

Will execute command at 1, 11, 21 and 31 from each month at 8:00, 8:15, 8:30, 8:45, 12:00, 12:15, etc ... till 20:45.

Magdi