Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-21-2011, 06:29 AM   #1
LQ Newbie
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
Unhappy crontab

how to check time length of last running crontab job ?? plz help me plz plz
Old 10-21-2011, 06:49 AM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
This will tell you the start time of the last run cron job:
tail -n1 /var/log/cron
If the job is still running, you can get the run time from 'ps' on the process id from the above.

Last edited by macemoneta; 10-21-2011 at 06:51 AM.
Old 10-21-2011, 08:07 AM   #3
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
I would suggest using a bash script such as this:
echo starting cron>/var/tmp/cron-execution.txt
date >>/var/tmp/cron-execution.txt
# insert your true cron here
echo stopping cron>>/var/tmp/cron-execution.txt
date >>/var/tmp/cron-execution.txt


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] crontab help mwkemo Linux - Newbie 3 10-28-2009 01:11 PM
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 05:07 AM
replaced crontab, now should get crontab back to what it was raminn Linux - Newbie 2 10-20-2008 07:15 PM
man crontab(5) vs crontab(1) Canis Polaris Linux - Newbie 2 06-04-2008 04:03 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration