Operating System - HP-UX
1837970 Members
2649 Online
110124 Solutions
New Discussion

Re: Cron jobs not executing

 
SOLVED
Go to solution
John Ferrara
Frequent Advisor

Cron jobs not executing

I have a root cron job that is supposed to reboot the server once a week (mon.@12pm). The log shows is ran:

> CMD: /home/root/shutsys.sh
> root 25379 c Mon Mar 25 12:00:00 CST 2002

The script is simple:

cd /
/sbin/shutdown -yr 0

This script has run for a few years w/o problems. Any suggestions?

John Ferrara

It was working fine when I left....what did you do?
4 REPLIES 4
harry d brown jr
Honored Contributor
Solution

Re: Cron jobs not executing


Why not just do this in crontab ????

59 23 * * 5 /sbin/shutdown -r -y 0

Also, check your shutdown.allow file, in /etc.


live free or die
harry
Live Free or Die
Mark Vollmers
Esteemed Contributor

Re: Cron jobs not executing

John-

the common places to start looking are permissions on the script file and the file itself. But in your case, I'd agree with Harry. Since there's only one line in the script, seems easier to use the command. Plus, you know the permissions, etc should be right.

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Darrell Allen
Honored Contributor

Re: Cron jobs not executing

Hi John,

Has the script been changed? Permissions on the script? Anything in /etc/shutdownlog, /etc/rc.log, root's mail? /sbin/shutdown permissions? What's changed since the last time it ran successfully?

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
John Ferrara
Frequent Advisor

Re: Cron jobs not executing

The only thing that has changed is that I installed 12/2001 10.20 cum.patch.

The shutdown.allow file was 0 bytes. I populated it w/ my userid & root.

I modified ../crontabs/root to run the command directly instead of the small script.

I think it should work now. I also modified another cron entry that ran a file deletion script ( rm /tmp/CTT* ). I also put the command directly on the cron line. I'll let you lnow if it works.

Thanks,
John Ferrara
It was working fine when I left....what did you do?