![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cron Job notification email | elmesy | AIX | 1 | 01-13-2009 08:15 AM |
| failing drive | markper | AIX | 4 | 07-21-2008 01:28 PM |
| Problem with Cron Email Notification | sasaliasim | AIX | 1 | 04-29-2008 12:02 PM |
| ssh - rm failing | shihabvk | Shell Programming and Scripting | 4 | 09-30-2005 02:27 AM |
| FTP login failing | zbis12 | UNIX for Dummies Questions & Answers | 3 | 05-24-2002 11:01 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Notification of cron failing
I have just found out that a cron i set up to run everyday has not been running. It turns out there was a problem with the box???
How can i get a notification if it does absolutely nothing i.e. an email to say cron not working today?? any help I'm using KSH Solaris Last edited by Pablo_beezo; 03-10-2009 at 12:23 PM.. |
|
||||
|
How are you going to fire off or schedule a check on crond ( the cron daemon) if it is not running? at, batch, and crontab all depend on the crond process being up, happy, and working.
A possibility is to look thru the process list every hour with a permanently running process. This is not a great idea but you could try something like this: Code:
while true do sleep 3600 # one hour ps -ef > /tmp/t.lis grep -q 'crond' /tmp/t.lis || echo 'crond is down' | /usr/bin/mailx -s 'crond is down' me@my.com done Sometimes having a proactive sysadmin with the right toolset is the best choice - hacks like this come in a distant second. |
|
||||
|
Do you have any system monitoring software running on your server. Example: HP Openview? If yes, then this can be detected and notifications can be sent out.
|
| Sponsored Links | ||
|
|