/etc/cron.daily not running

Daevid Vincent daevid at daevid.com
Mon Feb 23 19:43:15 UTC 2009


I installed 8.04 and upgraded to 8.10 server, then added the
ubuntu-desktop and various other packages.

I'm noticing my /etc/cron.daily is not running.

First, if I run it by hand, it hangs on 'apt'. 

root at daevid:/usr/sbin# run-parts -v /etc/cron.daily
run-parts: executing /etc/cron.daily/0anacron
run-parts: executing /etc/cron.daily/apache2
run-parts: executing /etc/cron.daily/apport
run-parts: executing /etc/cron.daily/apt
[and it just sits here forever ?!]

so I put 'exit' at the top of the 'apt' script.

root at daevid:/etc/cron.daily# run-parts -v /etc/cron.daily
run-parts: executing /etc/cron.daily/000_cron_daily_test

Begining to process all scripts in /etc/cron.daily...

run-parts: executing /etc/cron.daily/0anacron
run-parts: executing /etc/cron.daily/ZZZ_cron_daily_test

All scripts in /etc/cron.daily completed to this point.

run-parts: executing /etc/cron.daily/apache2
run-parts: executing /etc/cron.daily/apport
run-parts: executing /etc/cron.daily/apt
run-parts: executing /etc/cron.daily/aptitude
run-parts: executing /etc/cron.daily/bsdmainutils
run-parts: executing /etc/cron.daily/logrotate
run-parts: executing /etc/cron.daily/man-db
run-parts: executing /etc/cron.daily/mlocate
run-parts: executing /etc/cron.daily/ntp
run-parts: executing /etc/cron.daily/samba
run-parts: executing /etc/cron.daily/standard
run-parts: executing /etc/cron.daily/sysklogd
run-parts: executing /etc/cron.daily/webalizer

Also, why does my ZZZ_cron_daily_test script run at the top and not the
bottom even though it's sorted properly in a directory listing?!

root at daevid:/etc/cron.daily# ll 
total 88
drwxr-xr-x   2 root root  4096 2009-02-23 11:12 .
drwxr-xr-x 151 root root 12288 2009-02-23 11:05 ..
-rwxr-xr-x   1 root root    82 2009-02-20 11:24 000_cron_daily_test
-rwxr-xr-x   1 root root   311 2008-09-02 16:37 0anacron
-rwxr-xr-x   1 root root   633 2008-02-01 20:10 apache2
-rwxr-xr-x   1 root root   219 2008-10-23 23:10 apport
-rwxr-xr-x   1 root root  7793 2009-02-23 11:04 apt
-rwxr-xr-x   1 root root   314 2008-04-04 02:56 aptitude
-rwxr-xr-x   1 root root   502 2007-12-12 05:59 bsdmainutils
-rwxr-xr-x   1 root root    89 2006-06-19 11:21 logrotate
-rwxr-xr-x   1 root root   954 2008-03-12 06:24 man-db
-rwxr-xr-x   1 root root   646 2008-06-26 07:17 mlocate
-rwxr-xr-x   1 root root  1154 2009-01-06 07:55 ntp
-rw-r--r--   1 root root   102 2008-04-08 11:02 .placeholder
-rwxr-xr-x   1 root root   383 2008-04-02 14:36 samba
-rwxr-xr-x   1 root root  3349 2008-09-09 12:46 standard
-rwxr-xr-x   1 root root  1309 2007-11-23 01:06 sysklogd
-rwxr-xr-x   1 root root  1450 2008-05-11 01:27 webalizer
-rwxrwxrwx   1 root root    84 2009-02-20 11:24 ZZZ_cron_daily_test

If I rename it to "zzz_cron_daily_test" then it works in the right
order. But that is completely retarded!

root at daevid:/etc/cron.daily# ll /usr/sbin/anacron 
-rwxr-xr-x 1 root root 26216 2008-09-02 16:37 /usr/sbin/anacron

root at daevid:/etc/cron.daily# cat /etc/crontab 
# /etc/crontab: system-wide crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user	command
17 *	* * *	root    cd / && run-parts --report /etc/cron.hourly
25 6	* * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )

running them as crontab would do doesn't seem to do jack squat?!

root at daevid:/etc/cron.daily# test -x /usr/sbin/anacron || ( cd / &&
run-parts --report /etc/cron.daily )
root at daevid:/etc/cron.daily# 

root at daevid:/usr/sbin# env -i sudo sh
# cd /
# test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
# 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090223/9f3b5166/attachment.html>


More information about the ubuntu-users mailing list