Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

cron monitoring

Posted on 2004-08-25
5
1,005 Views
Last Modified: 2008-03-17
Is there a way to get a report of which execution of a cron did not happen as planned?

Example: I have a cron job thats scheduled to execute every 5 minutes.
I would like to know if it did run once every 5th minute or did it execute for the first 4 instances and then on no new executions took place

Why I need this : I want to use this to monitor if a job is taking more than its scheduled time or hanging.

Is this approach correct?
Or is there a better way to do this?

Any pointer will be helpful.

cheers!
bitnal
0
Comment
Question by:bitnal
5 Comments
 
LVL 18

Expert Comment

by:liddler
ID: 11890775
have a look at the /var/cron/log file, that will tell you if a cronjob has failed / succeded
0
 
LVL 20

Accepted Solution

by:
Gns earned 40 total points
ID: 11901191
All unices might not have the same "placement" of the logfile... On an AIX near me the file is at /var/adm/cron/log (also linked through /usr/lib/cron). On linux this might vary but a general place is /var/log/cron... On Solaris it is as liddler indicate.

Another approach is to wrap the cronjob in a script that creates a separate logfile.... This is probably the most common solution.

-- Glenn
0
 
LVL 62

Expert Comment

by:gheist
ID: 11906063
Or another approach is to log *.debug to well watched file
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question