On 13:24 Wed 12 Jan , Dan wrote:
Carlos E. R. wrote:
The Monday 2005-01-10 at 12:11 +0100, Dan wrote:
Thanks for all the replies. They have been helpful. I just manually ran
/etc/cron.daily/logrotate and that rotated (compressed) my logs.
So for some funny reason I think that cron has stopped running the above command even though it is in /etc/cron.daily/
Mmmm. Check to see if it is executable; mine has this permissions:
-rwxr-xr-x 1 root root 176 2004-04-06 03:26 /etc/cron.daily/logrotate*
Where can I find the instructions for cron to run the cron.daily commands?
My etc/crontab file contains the following commands: 59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 14 4 * * * root rm -f /var/spool/cron/lastrun/cron.daily 29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
It should also contain this line before those:
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
The script run-crons is the master one.
Well, we're getting closer. I remmed out this line in my crontab:
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
because it was generating errors in my root mailbox.
I put it back and get errors again in root mailbox. Here is the error:
Subject:Cron <root@linux> root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1 Body: /bin/sh: line 1: root: command not found
Any ideas why my master cron script isn't running? I haven't edited it or anything.
I have other commands in crontab that run daily so I know that etc/crontab is running.
Have a look at the logs (/var/log/messages). Also errors in cron are mailed to root.
Sorry for being a newbie ;-)
Please don't :-)
:-)
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
FTR: I have *always* had to set the logrotate to --force, or it does nothing. This has been true for me on v9, 9.1, 9.2. If I open the /etc/cron.daily/logrotate file & add that '--force' option it never fails to run. -- ..."Yogi" CH Namasté Yoga Studio