Operating System - HP-UX
1752785 Members
6006 Online
108789 Solutions
New Discussion юеВ

Re: crontab not working on HP-UX 11.23 ia64

 
Ramprasad_1
Occasional Advisor

crontab not working on HP-UX 11.23 ia64

Hi all,

I tried the following verbose steps and could not make cron work. I see that the the cron account file (/usr/lib/cron/log) contains ts=132. Is this an error code?

Please help me on this.

bash-3.2# crontab -l
* * * * * touch /tmp/cronfile

bash-3.2# ls -l /tmp/cronfile
/tmp/cronfile not found

bash-3.2# date
Wed Nov 12 22:57:49 PST 2008
bash-3.2# date
Wed Nov 12 22:57:51 PST 2008

bash-3.2# ls -l /tmp/cronfile
/tmp/cronfile not found

bash-3.2# date
Wed Nov 12 23:00:06 PST 2008

bash-3.2# tail -f /usr/lib/cron/log
< root 1239 c Wed Nov 12 22:57:00 PST 2008 ts=132
> CMD: touch /tmp/cronfile
> root 1245 c Wed Nov 12 22:58:00 PST 2008
< root 1245 c Wed Nov 12 22:58:01 PST 2008 ts=132
> CMD: touch /tmp/cronfile
> root 1432 c Wed Nov 12 22:59:00 PST 2008
< root 1432 c Wed Nov 12 22:59:00 PST 2008 ts=132
> CMD: touch /tmp/cronfile
> root 1434 c Wed Nov 12 23:00:00 PST 2008
< root 1434 c Wed Nov 12 23:00:01 PST 2008 ts=132

bash-3.2# ls -l /tmp/cronfile
/tmp/cronfile not found

bash-3.2# /sbin/init.d/cron stop
cron stopped
bash-3.2# /sbin/init.d/cron start
cron started

bash-3.2# ps -ae | grep cron
2421 ? 0:00 cron

bash-3.2# kill -s SIGHUP 2421

bash-3.2# date
Wed Nov 12 23:09:58 PST 2008

bash-3.2# ls -l /tmp/cronfile
/tmp/cronfile not found

Thanks,
Ramprasad B
12 REPLIES 12
Aneesh Mohan
Honored Contributor

Re: crontab not working on HP-UX 11.23 ia64

Hi Ramprasad,

You may need to add the path for touch in your cron command line.

try this :-
# * * * * * /usr/bin/touch /tmp/crontabfile

Aneesh
Ivan Krastev
Honored Contributor

Re: crontab not working on HP-UX 11.23 ia64

What is the reason of this schedule:

* * * * * touch /tmp/cronfile

???

Better try with something that make sence:
*/5 * * * * touch /tmp/file

(every 5 minutes)

regards,
ivan
Ramprasad_1
Occasional Advisor

Re: crontab not working on HP-UX 11.23 ia64

Hi,

I user absolute path to touch command, still cron daemon is unable to execute the comman -

/usr/bin/touch /tmp/cronfile

Thanks,
Ramprasad B
Ramprasad_1
Occasional Advisor

Re: crontab not working on HP-UX 11.23 ia64

Typos fixed :)

Hi,

I used the absolute path for touch command, but still the cron daemon is unable to execute the command -

/usr/bin/touch /tmp/cronfile

Thanks,
Ramprasad B
Ramprasad_1
Occasional Advisor

Re: crontab not working on HP-UX 11.23 ia64

There is no difference if we make minute field from * to */5

Only the interval is changed :)

Thanks,
Ramprasad B
Dennis Handly
Acclaimed Contributor

Re: crontab not working on HP-UX 11.23 ia64

>contains ts=132. Is this an error code?

This indicates that signal 4 (132-128), illegal instruction was received. It could be sh(1)?

The last time something similar happen, it was a bogus TZ variable, what do you have? Any corefiles hanging around?

>Ivan: */5 * * * * touch /tmp/file

This syntax isn't supported on HP-UX.
Ramprasad_1
Occasional Advisor

Re: crontab not working on HP-UX 11.23 ia64

I found two of them -

bash-3.2# find / -name core
/var/opt/dce/dced/core
/var/spool/cron/atjobs/core
bash-3.2#

How do i examine them?

Thanks,
Ramprasad B
Suraj K Sankari
Honored Contributor

Re: crontab not working on HP-UX 11.23 ia64

Hi,

Did you check weather cron demon is running or not
ps -aef | grep -i cron
root 2894 1 0 Sep 28 ? 0:02 /usr/sbin/cron

If not then start it

Give full absolute path for each command which is using in crontab file.

Suraj
Ramprasad_1
Occasional Advisor

Re: crontab not working on HP-UX 11.23 ia64

bash-3.2# ps -ae | grep cron
22770 ? 0:00 cron
bash-3.2# crontab -l
* * * * * /usr/bin/touch /tmp/cronfile
bash-3.2#

But, no positive results.

Thanks,
Ramprasad