?
Solved

cron monitoring

Posted on 2004-08-25
5
Medium Priority
?
1,022 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
[X]
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
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 160 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 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