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 :-)
:-)