View Single Post

  #2 (permalink)  
Old 12-16-2006
Tony Lawrence
 
Posts: n/a
Default Re: Cron not working on ubuntu 6.06


MrTomer wrote:
> I installed ubuntu 6.06 server. when i do
> ps -ef|grep cron
> i get:
> root 3616 1 0 Dec08 ? 00:00:01 /usr/sbin/cron
>
> and yet, none of the things in cron.daily or the other cron folders get
> executed. Any ideas? here is the cron /etc/crontab file:


"ls -lut" can help you track down what (if anything) is failing.

For example, my crontab runs cron.hourly at 11 past the hour. So if I
do
"ls -lut /etc/cron.hourly" I expect to see corresponding timestamps:

-rwxr-xr-x 1 root root 52 Dec 16 04:11 dyndns.pl
-rwxr-xr-x 1 root root 86 Dec 16 04:11 logit
-rwxr-xr-x 1 root root 106 Dec 16 04:11 tally

cron.daily runs at 4:02 am, so "ls -lut" shows that stuff ran:

--
-rwxr-xr-x 1 root root 193 Dec 16 04:07 tmpwatch
-rwxr-xr-x 1 root root 132 Dec 16 04:07 slocate.cron
-rwxr-xr-x 1 root root 100 Dec 16 04:07 tetex.cron
-rwxr-xr-x 1 root root 104 Dec 16 04:02 rpm
-rwxr-xr-x 1 root root 418 Dec 16 04:02 makewhatis.cron
-rwxr-xr-x 1 root root 1603 Dec 16 04:02 prelink
-rwxr-xr-x 1 root root 180 Dec 16 04:02 logrotate
-rwxr-xr-x 1 root root 800 Dec 16 04:02 certwatch
-rwxr-xr-x 1 root root 739 Dec 16 04:02 kjunk
-rwxr-xr-x 1 root root 135 Dec 16 04:02 00webalizer
-rwxr-xr-x 1 root root 276 Dec 16 04:02 0anacron

Notice that some of this didn't run till 4:07? That's because the
previous commands took a while.

9 times out of 10 when someone complains that cron isn't working, it
actually is, and it's just some specific job THEY added that isn't
working, and 99 out of 100 times, that's because they don't understand
cron's environment (see http://aplawrence.com/Unixart/cron.html )

--
Tony Lawrence
Unix/Linux/Mac OS X Resources
http://aplawrence.com

Reply With Quote