LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This 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.

Notices

Tags used in this thread
Popular LQ Tags , , , , , , , ,

Reply
 
Thread Tools
Old 12-18-2003, 04:14 AM   #1
juanb
Member
 
Registered: May 2002
Posts: 401
Thanked: 0
How can I tell if crontab jobs are axecuting ?


[Log in to get rid of this advertisement]
Hi !!

I edited /etc/crontab and than

did :

/etc/init.d/crond restart

I schadule a job to execute 20 minutes ago.how can I check if the system tried to execute?

whan the job starts from the command line (without crontab) another terminal window is open and than the program starts , after I edited crontab I waited and nothing happend.

thanks
juanb is offline     Reply With Quote
Old 12-18-2003, 10:39 AM   #2
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 592
Thanked: 1
Cron will never put anything on the display unless you use something like 'wall' in your cron script.
Are you redirecting output to a log file or anything? it wouldn't be hard to add a line at the bottom of your script that does something like:
date +"%D %r `echo Cron completed`" >> /tmp/cron_job.log
Then you could check /tmp/cron_job.log and it would tell you when it finished.
Blinker_Fluid is offline     Reply With Quote
Old 12-22-2003, 05:10 AM   #3
juanb
Member
 
Registered: May 2002
Posts: 401
Thanked: 0

Original Poster
ok ! I did what u told me:
here is my contab flle: ( I added /etc/panda/run):

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
00 22 * * * /usr/lib/panda/ftp
30 11 * * * /etc/panda/run
0-59/5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg
date +"%D %r 'echo Cron completed'" >> /tmp/cron_job.log


this is the content of /etc/panda/run:

#script to run antivirus
cd /etc/panda/pavcl
pavcl / -AUT

permissions:
[root@mr incoming]# ls -la /etc/panda/run
-rwxr-xr-x 1 root root 59 Dec 18 10:16 /etc/panda/run

I also restartes crond after the changes but he doesnt creats any file in /tmp so I dont know if /etc/panda/run executed/

thanks
juanb is offline  
Tag This Post , , , , , , , ,
Reply With Quote
Old 12-22-2003, 06:57 AM   #4
TheOneKEA
Member
 
Registered: Oct 2003
Location: Somewhere in London, riding the Underground
Distribution: Debian testing/main (2.6.23)
Posts: 272
Thanked: 0
Usually you can tell when a cron job is active, during periods of inactivity - any performance meters that are running will show the spike in %CPU, HD and general process activity. I think you can configured anacron or vixie-cron to send root an intra-system message when a job completes.
TheOneKEA is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab jobs aren't running mdm_linux Linux - General 4 05-30-2005 01:27 PM
Extra cron jobs not in "crontab -e"? inspleak Linux - General 2 07-21-2004 10:47 PM
crontab doesnt works with all jobs. pxes351 Linux - Newbie 2 05-10-2004 02:11 AM
fg, jobs etc ftgow Linux - General 7 02-26-2004 11:28 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM


All times are GMT -5. The time now is 06:09 PM.

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