Crons -Last run time and errorlog


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Crons -Last run time and errorlog
# 1  
Old 07-02-2010
Crons -Last run time and errorlog

Hi

There are few crons running under my account. How to check the last run time of the Cron and if it has run successfully without any errors.

Also if there are any errors while running, will the errors be stored some where?

How to check the status of all the Crons?

Thanks
Ashok
# 2  
Old 07-02-2010
All you mention should be done from the applications running. Cron isn't going to save off process errors unless you are directing the cron job off to a log file. I am guessing logging isn't available from the processes being ran as that would show last run time and any errors, if it was programmed properly.
# 3  
Old 07-03-2010
in syslog you will be able to find out whether the cron ran the particular job or not.. but the error kind of thing you have to take care from the application side..

Only starting the said process in the time is the job of cron, it does not worries about any error.. and proceeds.
# 4  
Old 07-03-2010
Depending on the Operating System the failure exit code (rc=) is usually in /usr/adm/cron/log. This also logs successful execution. See "man cron" for the location of your log. If there is unredirected output from the cron job this will be in unix mail for the user. As advised earlier it is easier to build your own logging into the cron job.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Execution Problems with Crons

Buddies, cron is not executing any monitoring scripts for 'Oracle' user in Red Hat Linux 5. Details about the cron job :- oracle@localhost ~]$ crontab -l 15 7 * * * /home/oracle/tab.sh The tab.sh script when firing manually is working fine. Any inputs/advice will be great for me. (12 Replies)
Discussion started by: sandip250382
12 Replies

2. AIX

Forwarding AIX syslog/errorlog to remote SQL DB

Due to a project I'm currently tasked with I'm spending my time trying to find a way to forward the syslog to a remote, in this case Red Hat, server and squeezing it into a SQL DB. Rsyslog is doing this job quite nicely for most of our test-servers, but I couldn't find any reliable information on... (1 Reply)
Discussion started by: Skleindl
1 Replies

3. Shell Programming and Scripting

Working With Crons

It said I had to approve them through here or something because they won't work and everyone on my site Is gettin pissed off. Please help (3 Replies)
Discussion started by: hell-on-earth
3 Replies

4. UNIX for Advanced & Expert Users

Redirect ErrorLog to a script

Hello, guys! I need to redirect the error_log of apache web server to a script. I tried to use a pipe instead of a filename but this will cause me some troubles beacause cPanel doesn't like it. So, I would like to try something else. Do you have any ideea on how can I read the content of the... (2 Replies)
Discussion started by: Sergiu-IT
2 Replies

5. Shell Programming and Scripting

last run time of any script

how to find when last time a scrit has ran? (7 Replies)
Discussion started by: RahulJoshi
7 Replies

6. Shell Programming and Scripting

run script for given time

Hi! I need to run my script for a specific number of time, as specified by the user: For instance, if the user specified 10, my script should run for until 10 seconds expire. How do I do this? (0 Replies)
Discussion started by: looza
0 Replies

7. SCO

Multple crons at boot

I am running SCO on a Netfinity system and two crons are started on bootup, but only after the system is brought down hard. i.e. running haltsys, reboot, or by a power outage. Has anyone seen this before and know a resolution to stop it? (0 Replies)
Discussion started by: ertzman
0 Replies

8. UNIX for Dummies Questions & Answers

Figuring out Crons

Hello, I've built a news site using SimplePie to pull in a set of feeds and display them on a page. The caching is working but the problem is that the first initial load is slow. After that, you can hit refresh and it loads very quickly. I'd like to eliminate that first slow load by creating a... (2 Replies)
Discussion started by: eightgames
2 Replies

9. AIX

Porblem with errorlog

hi all, i am facing a problem that my error log was empty(0 byte). i dont whether threr is any mistake or my server working that much nicly...... please find some output down. # errpt 0315-180 logread: UNEXPECTED EOF 0315-171 Unable to process the error log file /var/adm/ras/errlog.... (1 Reply)
Discussion started by: rrlog
1 Replies

10. UNIX for Dummies Questions & Answers

Crons executed multiple times.

For some reason my crons are being executed twice. Any suggestion?? I'm currently on 5.8 (2 Replies)
Discussion started by: shorty
2 Replies
Login or Register to Ask a Question