- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Monitoring cron daemon
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2006 08:02 PM
09-18-2006 08:02 PM
I need some help writing a script to start my cron if its not running.It falls over once a month which causes alot of problems.Plain & simple script to start /sbin/rc2.d/S70CRON start
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2006 08:27 PM
09-18-2006 08:27 PM
Re: Monitoring cron daemon
from thread:
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=1024003
see Steven's answer.
and
http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=1051115
Please also look read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
Your profile says, you have not found any answers point-worthy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2006 01:11 AM
09-19-2006 01:11 AM
Solution# cat croncheck.sh
#!/usr/bin/sh
while true
do
if [[ $(UNIX95= ps -H -C cron -o pid= | wc -l) -lt 1 ]]
then
echo "cron restarted:\n$(date)" | mailx -m -s "cron restarted!" root
/sbin/init.d/cron start
fi
sleep 120
done
exit
Change 120 (2 minutes) to whatever interval you wish. For obvious reasons, you cannot schedule this script to run via cron. Instead, use 'nohup':
# nohup croncheck.sh > /dev/null 2&>1 &
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2006 02:21 AM
09-19-2006 02:21 AM
Re: Monitoring cron daemon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2006 02:30 AM
09-19-2006 02:30 AM
Re: Monitoring cron daemon
so you did not like the:
MYPROC=sendmail
COUNT=$(UNIX95=1 ps -C $MYPROC -o pid= -o args= | wc -l)
if [ $COUNT -lt 1 ]
then
/sbin/init.d/$MYPROC start
fi
example in the second link given?
Change the sendmail to cron and you had your solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2006 05:11 PM
09-19-2006 05:11 PM
Re: Monitoring cron daemon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2006 05:13 PM
09-19-2006 05:13 PM