Solved

cron monitoring

Posted on 2004-08-25
5
1,016 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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

690 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