LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 12-18-2003, 03:14 AM   #1
juanb
Member
 
Registered: May 2002
Posts: 401

Rep: Reputation: 30
How can I tell if crontab jobs are axecuting ?


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
 
Old 12-18-2003, 09:39 AM   #2
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 682

Rep: Reputation: 63
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.
 
Old 12-22-2003, 04:10 AM   #3
juanb
Member
 
Registered: May 2002
Posts: 401

Original Poster
Rep: Reputation: 30
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
 
Old 12-22-2003, 05:57 AM   #4
TheOneKEA
Member
 
Registered: Oct 2003
Location: Somewhere in Surrey
Distribution: Debian GNU/Linux 7.4.0 (amd64) w/kernel 3.13.0
Posts: 279

Rep: Reputation: 30
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.
 
Old 01-27-2011, 09:08 AM   #5
chrber
LQ Newbie
 
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
file /var/log/cron

This is a file where the cron job execution gets reported. I looked there and found that my job is executed.
 
  


Reply

Tags
file, future, how, output, redirect, references, virus


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
crontab jobs aren't running mdm_linux Linux - General 4 05-30-2005 12:27 PM
Extra cron jobs not in "crontab -e"? inspleak Linux - General 2 07-21-2004 09:47 PM
crontab doesnt works with all jobs. pxes351 Linux - Newbie 2 05-10-2004 01:11 AM
fg, jobs etc ftgow Linux - General 7 02-26-2004 10:28 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM


All times are GMT -5. The time now is 11:15 AM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration