The Wednesday 2005-01-12 at 13:24 +0100, Dan wrote:
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.
Then we need to have a look at the /usr/lib/cron/run-crons file, the first few lines. Mine (SuSE 9.1) goes like this: #!/bin/bash # # /usr/lib/cron/run-crons # # Copyright (c) 1998-2001 SuSE GmbH Nuernberg, Germany. All rights reserved. # # this script looks into /etc/cron.{hourly,daily,weekly,monthly} for # scripts to be executed. The info about last run is stored in # /var/spool/cron/lastrun # Watch that the first line must be comented out, and exactly like that, because althoug it seems a coment, it is interpreted, telling the system what program should interpret the script. (In SuSE systems, /bin/sh is a symlink to bash) and, after a bunch of comments, the script continues like this - for SuSE 9.1, I don't know what you have: # set to "true" to send a mail even if all scripts returned OK SEND_MAIL_ON_NO_ERROR=false BASENAME=`/usr/bin/basename $0` LOGGER="/bin/logger -t $BASENAME[$$]" export LC_TIME=POSIX TMPDIR=`mktemp -d /tmp/run-crons.XXXXXX` trap "rm -rf $TMPDIR" 0 1 2 3 13 15 # Priority change for sub scripts. # If the file is broken, replace it from the original, in cron-...rpm on your dvd or whatever. You do not need to reinstall the rpm completely if you do not want to: you can simply use "mc", [enter] on the rpm file, browse to the script and copy. Midnight Comander, mc for short, is a magnific text based file browser, and much more. It is a Norton Comander for MsDOS look alike. It is very fast, feature full (edit, open/create compressed archives or rpm packages, ftp...), and can be used remotely, even over a modem link. It is text based, but the mouse works, and it has menues. The only thing it doesn't have is graphics :-) If you are sure you did not modify the script yourself (check the timestamp), check your filesystem for errors (fsck from the rescue system). -- Cheers, Carlos Robinson