1843977 Members
1622 Online
110226 Solutions
New Discussion

Re: crontab problems

 
SOLVED
Go to solution
Safir Safir
Advisor

crontab problems

Hello,

I have a problem on cron.
the date was modified on the server and since then the cron jobs does not start.System is HP9000 with HPUX11i ver1.

I stopped the cron deamon and restart it ,i verified all the permission,the writes everything is fine.i stopped all the cron and i created only one job and assigned it to root user .the job does not start and in /var/adm/cron/log i had the following :
> CMD: /usr/bin/date >> /tmp/ez.log
> root 22620 c Thu Mar 13 08:25:00 GMT 2008
< root 22620 c Thu Mar 13 08:25:00 GMT 2008 ts=139.

what is the ts errors? someone has an idea ,i didnt get an rc error???

thank you in advance
BR
33 REPLIES 33
Pete Randall
Outstanding Contributor
Solution

Re: crontab problems

That looks like a perfectly normal cron log entry. Your command "/usr/bin/date >> /tmp/ez.log" was started at 8:25:00 with PID 22620 and completed at 8:25:00.

The question is, what does /tmp/ez.log contain?


Pete

Pete
Safir Safir
Advisor

Re: crontab problems

Hello,

the ez.log file is empty nothing in it .Even i ran the cron that they are related to other users with no success. the log file contain 3 entries but with ts=11 .

so what do you think about it?

BR
Dennis Handly
Acclaimed Contributor

Re: crontab problems

ts= means you got a signal.
In your case, signal 139-128 == 11
Yogeeraj_1
Honored Contributor

Re: crontab problems

hi BR,

can you also post the output of:
ps -ef|grep cron

we want to know if the process is running.


also, the cron log file:
tail /var/adm/cron/log


revert

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Safir Safir
Advisor

Re: crontab problems

Hello

Please find below the output of ps

> CMD: /usr/bin/date >> /tmp/ez.log
> root 29547 c Thu Mar 13 13:50:00 GMT 2008
< root 29547 c Thu Mar 13 13:50:00 GMT 2008 ts=11
> CMD: /usr/bin/date >> /tmp/ez.log
> root 29610 c Thu Mar 13 13:51:00 GMT 2008
< root 29610 c Thu Mar 13 13:51:00 GMT 2008 ts=11

even i restart the server and still the same error. the cron is running

ps -ef|grep cron gives the following:
ps -ef|grep cron
root 1200 1 0 13:40:00 ? 0:00 /usr/sbin/cron
root 29415 29378 0 13:47:10 pts/ta 0:00 grep cron

please advise

BR


john korterman
Honored Contributor

Re: crontab problems

Hi,

your cron seems to run ok, as it starts your job and also registers that it has finished. But there is a problem with either /usr/bin/date or your computer.
What happens if you run /usr/bin/date from the command line? And does your syslog and mail to root not contain anything suspicious?

regards,
John K.
it would be nice if you always got a second chance
Yogeeraj_1
Honored Contributor

Re: crontab problems

hi again,

Answer John's questions above and perform the test below:

- Modify your crontab entry such that log files output-showdate.crn and error-showdate.crn

e.g.
#*******************************************************************************
# min|hour |day |month|day |script
# | |of mo| |of wk|
#----|-----|-----|-----|-----|--------------------------------------------------
#*******************************************************************************
05 07 * * * /home/yogeeraj/showdate.sh 1>/tmp/output-showdate.crn 2>/tmp/error-showdate.crn
#*******************************************************************************
# END OF TABLE day0->Sunday day6->Saturday
#*******************************************************************************

what does these files show?

revert!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Safir Safir
Advisor

Re: crontab problems

Hello,

When i run the date command ,there is nothing wornd in mail root or in syslog.log all seems to be normal.

i modified my crontab with the option 1 > file.err 2> file.crn

and both files are note created .and the tial /var/adm/cron/log same output as before with ts=139 .....

i installed the PHCO_35331 the latest patch for cron and PHNE_30425 the latest patch for elm
and still having the same error

please can you advice

thx
BR
Dennis Handly
Acclaimed Contributor

Re: crontab problems

What's your real problem?

cron should be working. How many users have crontabs? How many work?

If it is only this one, don't use that shell any more.

Can you find a core file from that signal?
What does your crontab entry look like?
Can you use /usr/sbin/sh at all?
Safir Safir
Advisor

Re: crontab problems

Hello again

all crons for all users are not working ,
root,oracle,debit all users even the cron.allow is here and contaims all the users.

even i made a cron with
echo hi > hi.log and not working

the output of crontab is like the following :

* * * * * /usr/bin/date >> /tmp/ez.log
for example

the cron deamon is running

Regards

Yogeeraj_1
Honored Contributor

Re: crontab problems

hi again,

can you try to restart the cron daemon?

/sbin/init.d/cron stop
/sbin/init.d/cron start


revert

kind regards
yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Safir Safir
Advisor

Re: crontab problems

hello again

I restarted the server

same result.

cron still not working

regards
Yogeeraj_1
Honored Contributor

Re: crontab problems

hi,

Will it be possible to post the content of the current crontab?


crontab -l


also, confirm that you can see the following message (or similar) in your /etc/rc.log
...
Start clock daemon
Output from "/sbin/rc2.d/S730cron start":
----------------------------
cron started
...


revert

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
C.I.S
Frequent Advisor

Re: crontab problems

Hi Again

pleae find below

* * * * * echo "hi abu el hond" >> /tmp/out.log
* * * * * /usr/bin/date >> /tmp/ez.log

Start clock daemon
Output from "/sbin/rc2.d/S730cron start":
----------------------------
cron started


BR
Yogeeraj_1
Honored Contributor

Re: crontab problems

hi again,

Perform the following steps so that the problem can be isolated ($$$$#error in crontab entries or script not executable#$$$$):

Step 1. Create a new script
$ vi /tmp/script1.sh
#!/usr/bin/sh
echo $(date)
#End of script

Step 2. Save script and make it executable
$ chmod +x /tmp/script1.sh

Step 3. Edit your contab and delete all the current entries (assuming it contains only the lines that you have posted above)

Step 4. Add the following lines in your crontab:

#*******************************************************************************
# min|hour |day |month|day |script
# | |of mo| |of wk|
#----|-----|-----|-----|-----|--------------------------------------------------
#*******************************************************************************
* * * * * /tmp/script1.sh 1>/tmp/output-script1.crn 2>/tmp/error-script1.crn
#*******************************************************************************
# END OF TABLE day0->Sunday day6->Saturday
#*******************************************************************************

Step 5. Save and exit the crontab editor.

Step 6. monitor files:
/tmp/output-script1.crn
/tmp/error-script1.crn


Update us on the results after a few minutes.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Safir Safir
Advisor

Re: crontab problems

Hello Again,

It is done as you said

/tmp/error-script1.crn and /tmp/output-script1.crn are not created.

/tmp/script1.sh it is working from command line

cron is started
and this is the output of /var/adm/cron/log

< root 6847 c Fri Mar 14 12:15:00 GMT 2008 ts=11
> CMD: /tmp/script1.sh 1>/tmp/output-script1.crn 2>/tmp/error-script1.crn
> root 6876 c Fri Mar 14 12:16:00 GMT 2008
< root 6876 c Fri Mar 14 12:16:00 GMT 2008 ts=11
> CMD: /tmp/script1.sh 1>/tmp/output-script1.crn 2>/tmp/error-script1.crn
> root 6998 c Fri Mar 14 12:17:00 GMT 2008
< root 6998 c Fri Mar 14 12:17:00 GMT 2008 ts=11
> CMD: /tmp/script1.sh 1>/tmp/output-script1.crn 2>/tmp/error-script1.crn
> root 7029 c Fri Mar 14 12:18:00 GMT 2008
< root 7029 c Fri Mar 14 12:18:00 GMT 2008 ts=1

BR
Dennis Handly
Acclaimed Contributor

Re: crontab problems

>script1.sh it is working from command line

That would indicate the shell is working.

About the only other explanation is some evil process is sending kill signals to your shell, under cron.
Yogeeraj_1
Honored Contributor

Re: crontab problems

hi,

There is definitely something 'weird' going on!

can you post the output of the following?
ll /var/adm/cron

e.g.
MYSRV:var/adm/cron>ll
total 192
-r--r--r-- 1 bin bin 52 Nov 14 2000 .proto
prw------- 1 root root 0 Nov 20 15:06 FIFO
-rw-r--r-- 1 root root 38658 Jan 30 17:03 OLDlog
-r--r--r-- 1 bin bin 25 Mar 11 2003 at.allow
-r--r--r-- 1 bin bin 14 Nov 14 2000 cron.allow
-rw-r--r-- 1 root root 19884 Mar 15 00:04 log
-r--r--r-- 1 bin bin 17 Nov 14 2000 queuedefs
MYSRV:var/adm/cron>


revert

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Safir Safir
Advisor

Re: crontab problems

hello

Please find below
#/var/adm/cron>ll
total 3744
-r--r--r-- 1 bin bin 52 Nov 14 2000 .proto
prw------- 1 root root 0 Mar 14 14:36 FIFO
-rw-r--r-- 1 root sys 363441 Mar 14 10:32 OLDlog
-r--r--r-- 1 bin bin 18 Nov 14 2000 at.allow
-r--r--r-- 1 bin bin 20 Feb 28 02:38 cron.allow
-rw-r--r-- 1 root root 866802 Mar 17 10:45 log
-r--r--r-- 1 bin bin 17 Nov 14 2000 queuedefs

is it possible that a third parity programs is killing the cron process as oracle ???

BR

Yogeeraj_1
Honored Contributor

Re: crontab problems

hi,

>is it possible that a third parity programs is killing the cron process as oracle ???

Not likely. It can only be a user script if it is indeed the case.

can you post the output of the following:
whereis cron
ll /usr/sbin/cron

e.g.
SRV2:>whereis cron
cron: /usr/sbin/cron /usr/share/man/man1m.Z/cron.1m
SRV2:>ll /usr/sbin/cron
-r-xr-xr-x 1 bin bin 40960 Aug 24 2006 /usr/sbin/cron
SRV2:>

revert

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
C.I.S
Frequent Advisor

Re: crontab problems

hello

please find below

#whereis cron
cron: /usr/sbin/cron /usr/share/man/man1m.Z/cron.1m

#ll /usr/sbin/cron
-r-xr-xr-x 1 bin bin 40960 Aug 24 2006 /usr/sbin/cron


BR
john korterman
Honored Contributor

Re: crontab problems

Hi again BR,

just guessing, but file permissions may have been changed or files may be missing.
I suggest that you look through the history files of the root user for commands like chmod, chown, rm and the like. Does anything there look suspicious?

regards,
John K.
it would be nice if you always got a second chance
Dennis Handly
Acclaimed Contributor

Re: crontab problems

>John: but file permissions may have been changed or files may be missing.

If this is the case, then "swverify \*" will do this check.
Safir Safir
Advisor

Re: crontab problems

hello there

all the permissions seems to be right

any suggestion

do u have any idea about the error code ts=11????

thank you in advance
BR