How can I tell if crontab jobs are axecuting ?
I edited /etc/crontab and than
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.
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.
ok ! I did what u told me:
here is my contab flle: ( I added /etc/panda/run):
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
pavcl / -AUT
[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/
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.
This is a file where the cron job execution gets reported. I looked there and found that my job is executed.
|All times are GMT -5. The time now is 04:27 PM.|