Operating System - HP-UX
1833771 Members
2283 Online
110063 Solutions
New Discussion

Re: Scheduled conjobs do not run

 
Indira Aramandla
Honored Contributor

Scheduled conjobs do not run

Hi,

We scheduled few cron jobs which were beeing executed fine. But since few weeks they do not seem to run. I checked the /var/adm/cron/log file and I can see the job has been scheduled for the correct time.
CMD: "name for the command and path"
> root 20536 c Tue May 25 16:47:00 WST 2004
< root 20536 c Tue May 25 16:47:00 WST 2004 rc=1

But I can the rc=1 and the job does not get executed. I also checked in cron.allow to see the user is included in the file. I checked the queuedefs file and all it has is this
a.4j1n
b.2j2n90w

What should I check for this. Thanks in advance for your help.

Indira A
Never give up, Keep Trying
12 REPLIES 12
Michael Schulte zur Sur
Honored Contributor

Re: Scheduled conjobs do not run

Hi,

can you look into syslog.log and post the crontab entry for that job?

thanks,

Michael
Indira Aramandla
Honored Contributor

Re: Scheduled conjobs do not run

Hi Michael,

I cannot see any reference to the cron job in the syslog.log.
I viewed the /var/adm/syslog/syslog.log and did not find any entry for the cronjob.




Indira A
Never give up, Keep Trying
Pete Randall
Outstanding Contributor

Re: Scheduled conjobs do not run

Indira,

What happened a few weeks ago that may have caused this? Did you apply some patches or something? You didn't mention what release you're running - latest cron patches would be PHCO_26562 for 11i, PHCO_27141 for 11.0. Are these applied?


Pete

Pete
Francesco Campalastri
Frequent Advisor

Re: Scheduled conjobs do not run

Does the script run manually?

Francesco
Tapas Jha
Valued Contributor

Re: Scheduled conjobs do not run

Hi Indira,

Check your patch fro cron. Also sometimes cron becomes corrupted.
So, you can backup the cron and then recreate the cron in below manner.
crontab -l > crontab.bak
crontab -r
crontab -e ( here u do like below:
ESC:r crontab.bak)
Check where crontab.bak file is there and give the full path of crontab.bak when u will do r from crontab -e.

Rgds
Tapas
Tapas Jha
John Carr_2
Honored Contributor

Re: Scheduled conjobs do not run

Hi Indira

to find out what is scheduled to run in cron you must use the command

crontab -l

cron picks up its scheduled jobs from memory not from looking at the files on disk, the command crontab -l simply displays the ascii file details not what is loaded into memory to run.

It is possible to manually edit the crontab files and have crontab list them but they do not run because they are not loaded.

To ensure they are loaded issue command

crontab crontab_filename

:-) John.
john korterman
Honored Contributor

Re: Scheduled conjobs do not run

Hi,
I think that the return code comes from execution of the script. If you do not redirect the output from the actual execution of the script in crontab, then check the mail to the user in whose crontab the script is executed.

regards,
John K.
it would be nice if you always got a second chance
Ralf Seefeldt
Valued Contributor

Re: Scheduled conjobs do not run

Hello Indira,
I do not know realy much about cron. i have only 1 Question:

Did the cronjob stop running with the change to daylight saving time or a few days later?

You can try stopping and restarting the cron daemon. I guess, that should fix the problem for now.

If you run HP-UX 10.xx, have a look at Patch install PHCO_27422 or some equivalent for your OS-version.

I hope, this helps

Bye
Ralf
Michael Schulte zur Sur
Honored Contributor

Re: Scheduled conjobs do not run

Indira,

I was talking about the entry from crontab -l. Do you redirect the output to a file and is this created/appended to?

hth,

Michael
Indira Aramandla
Honored Contributor

Re: Scheduled conjobs do not run

Thanks for all who replied. Here are answers for some of the questions.

Pete,
We are running on HP-UX 11.11 and we have the latest cron patches. I did not apply any pathces recently. There were no major changes, the only change I had done was to turn on the auditing using audsys.

Francesco,
We can run the same job manually.

Tapas,
I had tried what you specified. Does not help.

John,
I had checked the crontab to see if the jobs defined and crontab loaded.

John K,
The retrun code comes from the script, but that retrun code is from cron job I think.

And today I looked at the mail log and it had the following.

â Cron: Your job did not contain a valid audit ID.

Is this due to the auditing by audsys.

Thanks
Indira
Never give up, Keep Trying
Indira Aramandla
Honored Contributor

Re: Scheduled conjobs do not run

Hi All,

Figured out something more. The message reporting Cron: Your job did not contain a valid audit ID.
was caused due to the files missing in .cronaids directory. The error message is sent to the server because /usr/spool/cron/.cronaids/root file is missing.

To create the file i did this.

1. Run tsconvert -p
This will build a file /usr/spool/cron/.cronaids with the data
the system needs

2. Then restart cron.
/sbin/init.d/cron stop
/sbin/init.d/cron start

Indira A
Never give up, Keep Trying
Indira Aramandla
Honored Contributor

Re: Scheduled conjobs do not run

This thread is closed
Never give up, Keep Trying