1837984 Members
2748 Online
110124 Solutions
New Discussion

crontab[105] errors

 
SOLVED
Go to solution
Lee Oliver
Advisor

crontab[105] errors

Has anybody seen this error ??

The crontable has started giving weird errors - crontab[105] and won't show the actual file details, the file does actually exist in /var/spool/cron/crontabs/root but when typing = crontab -l, i get the error crontab[105].

It looks like the cron itself is mis-interpreting the command line. It errors saying the minutes (ie. 00) not found. it looks like this =

+ 00 08 dba dcollect gdr metron root root.020703 sysadmin dba dcollect gdr metro
n root root.020703 sysadmin dba dcollect gdr metron root root.020703 sysadmin /u
sr/local/bin/avro_datasize

I have also deleted and restarted cron itself.

Please help, thanks
Lee Oliver
i am what i am
16 REPLIES 16
Pete Randall
Outstanding Contributor

Re: crontab[105] errors

Is there really a plus sign (+) in the first field? If so, that's what it's complaining about.

From man crontab:

The entries in a crontab file are lines of six fields each. The
fields are separated by spaces or tabs. The lines have the following
format:

minute hour monthday month weekday command


Pete



Pete
Steven E. Protter
Exalted Contributor

Re: crontab[105] errors

That command line might work in Linux, but it won't work in HP-UX.

BTW, the way HP does it is the standard

Review Pete's comment. If you are not using one of the fields, use asterics for every time.

20 3 * * 2-6
at 3 20 a.m. Tuesday thru saturday.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Paula J Frazer-Campbell
Honored Contributor

Re: crontab[105] errors

HI Lee

If

+ 00 08 dba dcollect gdr metron root root.020703 sysadmin dba dcollect gdr metro
n root root.020703 sysadmin dba dcollect gdr metron root root.020703 sysadmin /u
sr/local/bin/avro_datasize


Is the format of your cron entry then it is incorrect.

If the entry /var/spool/cron/crontabs/root is corrupt either restore it from backup or try

strings /var/spool/cron/crontabs/root >/var/spool/cron/crontabs/root_new

and then copy /var/spool/cron/crontabs/root to /var/spool/cron/crontabs/root_bak and replace it with the root_new file and test with:-

crontab -l and post the results


Paula

If you can spell SysAdmin then you is one - anon
Paula J Frazer-Campbell
Honored Contributor

Re: crontab[105] errors

Lee

What does crontab -e give you?

Can you see all the cron entries?

Paula
If you can spell SysAdmin then you is one - anon
Lee Oliver
Advisor

Re: crontab[105] errors

Hi,

Sorry there is no '+' sign in the beginning of the file, this is displayed when running the command through 'ksh -x' debug mode.

sorry for the confusion.

lee
i am what i am
Pete Randall
Outstanding Contributor

Re: crontab[105] errors

Would you please post the output of crontab -l, then?


Pete



Pete
Lee Oliver
Advisor

Re: crontab[105] errors

Here is the actual out from the command 'crontab -l' =

root@N-0/var/spool/cron/crontabs>crontab -l
crontab[13]: 20: not found.
crontab[16]: 01: not found.
crontab[19]: 01: not found.
crontab[31]: 50: not found.
crontab[32]: 50: not found.
crontab[33]: 50: not found.
crontab[34]: 50: not found.
crontab[35]: 50: not found.
crontab[36]: 50: not found.
crontab[37]: 50: not found.
crontab[38]: 50: not found.
crontab[39]: 50: not found.
crontab[40]: 50: not found.
crontab[41]: 50: not found.


Here is what is in the actual root crontab file =

# SI Systems collection from mwa
20 03 * * * /var/opt/perf/si/siextract.hpux


i am what i am
Lee Oliver
Advisor

Re: crontab[105] errors

Hello Paula,

You get the same output from 'crontab -e' as i do from the 'crontab -l'.

cheers
Lee
i am what i am
Paula J Frazer-Campbell
Honored Contributor

Re: crontab[105] errors

Lee

Looks like a corupt cron file:-

What is the ownership and timestamps on:-

/var/spool/cron/crontabs/root


Try the fix I suggested as this will remove any non printable chars from the file.

But I guess it is now time find last nights backup tape or you can get it from your ignite tape.


How is life in the travel industry?

Paula

If you can spell SysAdmin then you is one - anon
Darren Prior
Honored Contributor

Re: crontab[105] errors

Hi Lee,

As it sounds as if there's some corruption or possibly control chars in the file I'd suggest that you use crontab -r to delete the existing crontab, then build a fresh crontab from scratch and resubmit using crontab

Don't be tempted to edit the /var/spool/cron/crontabs/root directly.

regards,

Darren.
Calm down. It's only ones and zeros...
Uday_S_Ankolekar
Honored Contributor

Re: crontab[105] errors

Recreate crontab by crontab -e , beofre that remove cronjob. you can remove current crontab by crontab -r
take a printout of your existing crontab ( root) and then just recreate it.
It looks like crontab root is corrupted. I guess error 105 means no audit id.

-USA..
Good Luck..
Lee Oliver
Advisor

Re: crontab[105] errors

Sorry folks, i have found the problem and it's my student as apposed to an actual problem.

He copied the crontab -l > fred into /usr/bin/crontab.


This caused the corruption.

Thanks for the help
Lee

Ps. He's now got the sack........and playing with his playstation 2..... :o)
i am what i am
Paula J Frazer-Campbell
Honored Contributor
Solution

Re: crontab[105] errors

Lee

Student with root access?????


I hope this is not a production server.



;^)


Paula

If you can spell SysAdmin then you is one - anon
Pete Randall
Outstanding Contributor

Re: crontab[105] errors

Paula,

He's now got root access to a Playstation. That may be safe enough!


Pete



Pete
Lee Oliver
Advisor

Re: crontab[105] errors

Hello Paula,

Travel Industry is terrible, lots of hours for very little pay......

Nobody is booking any holidays......

Very busy, not enough time, training up Pete and Steve, lost Raj. all go here.

Hope you're doing well.

Lee



i am what i am
Paula J Frazer-Campbell
Honored Contributor

Re: crontab[105] errors

Lee

Glad you solved it!

Where has Raj gone and have you got another DBA?

Life here busy, I am IT/Technical director for the IBP group not much Unix but lots of fun dealing with all aspects of the sound/lighting and stage management for shows.

Had a nice gig last week at the Churchill International - High Commissioner for Malaysia and Lord Mayor of Westminster in audience.

Paula
If you can spell SysAdmin then you is one - anon