[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: cron error messages
- From: Bob McClure Jr <robertmcclure earthlink net>
- To: redhat-install-list redhat com
- Subject: Re: cron error messages
- Date: Wed, 19 Nov 2003 22:34:24 -0600
On Thu, Nov 20, 2003 at 02:46:13PM +1100, Graeme Nichols wrote:
> On Mon, 2003-11-10 at 14:19, Bob McClure Jr wrote:
> > On Mon, Nov 10, 2003 at 01:43:27PM +1100, Graeme Nichols wrote:
> > > On Mon, 2003-11-10 at 13:36, Bob McClure Jr wrote:
> > > > On Mon, Nov 10, 2003 at 12:25:15PM +1100, Graeme Nichols wrote:
> > > > > Hello Bob McClure and others,
> > > > >
> > > > > I am getting a lot of these messages in my mail and I don't understand
> > > > > them. I have looked at the perl script mrtg and the mrtg.cfg files but
> > > > > line 1 doesn't have what the mail message appears to be complaining
> > > > > about. Line 1 is a comment. The mail message is as follows:
> > > > >
> > > > > begin mail message------------------------
> > > > >
> > > > > -- Date: Sat, 8 Nov 2003 11:50:01 +1100
> > > > > From: Cron Daemon <root localhost localdomain>
> > > > > To: root localhost localdomain
> > > > > Subject: Cron <graeme localhost> root /usr/bin/mrtg /etc/mrtg/mrtg.cfg
> > > >
> > > > The Subject line, above indicates this is a result of one of the
> > > > entries in your personal (graeme localhost) crontab. To look at it:
> > > >
> > > > crontab -l # as your mere mortal "graeme"
> > > >
> > > > If that's not in there, then look at the scripts it executes and see
> > > > if something like that is in one of them.
> > > >
> > > > > /bin/bash: line 1: root: command not found
> > > > >
> > > > > end mail message----------------------
> > > > >
> > > > > Can anyone tell me what is going on?
> > > >
> > > > My really wild guess is that you intended to have a line in your
> > > > crontab, maybe something like
> > > >
> > > > mm hh * * * su - root /usr/bin/mrtg /etc/mrtg/mrtg.cfg
> > > >
> > > > But what you have is
> > > >
> > > > mm hh * * * su -; root /usr/bin/mrtg /etc/mrtg/mrtg.cfg
> > > >
> > > > and you shouldn't have that ";" in there. That's a command
> > > > separator. Actually, that wouldn't even work. That's just a
> > > > contrived example of what could go wrong.
> > > >
> > > > To change your crontab, do
> > > >
> > > > crontab -e
> > > >
> > > > If you don't like the default vi for an editor, set or change the
> > > > EDITOR environment variable to something friendlier like "pico" or
> > > > something more powerful like "emacs".
> > > >
> > > > Excuse me while I go don my Nomex duds.
> > > >
> > > > > btw, I have root's mail redirected to my mail box.
> > > >
> > > > And well you should.
> > > >
> > > > > Kind regards,
> > > > >
> > > > > Graeme Nichols
> > > > >
> > > > > ----------------------------------------------------------------------
> > > > > You teach best what you most need to learn.
> > > >
> > > > Amen.
> > > >
> > > > Cheers,
> > > > --
> > > > Bob McClure, Jr. Bobcat Open Systems, Inc.
> > > > robertmcclure earthlink net http://www.bobcatos.com
> > > > God answers prayers, not advice.
> > >
> > > Thanks Bob, much appreciated. Will check it and fix it now.
> >
> > Let us know what it is (was). I'm curious. (Not that we want to
> > embarrass you. ;-)
>
> Hello Bob, I'm old enough now to be not too easily embarrassed but.... I
> haven't been able to fix it so I changed the frequency of running it so
> I get a lot less error messages :-)
>
> The entry currently is as follows:
>
> 05 4 1 * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg which still creates the
> error.
>
> Today I have changed that to read:
>
> 05 4 1 * * root run-parts /usr/bin/mrtg /etc/mrtg/mrtg.cfg
>
> on the basis that it is looking for a command, like the error message
> suggests. The other entries in crontab all have the command 'run-parts'
> following 'root' and they all work OK.
>
> That didn't work either. man mrtg says that it is a perl script and a
> fast C program that reads the traffic counters in the routers and
> creates lovely graphs of the traffic on the network which can be read in
> a browser. Doesn't work on my machine, don't have any routers, it just
> creates pages of errors in the script. So, I put a lovely little hash
> (#) at the front of the line. If you can't fix it, or you can't work it
> out, stomp on it!
>
> --
>
> Kind regards,
>
> Graeme Nichols
Graeme, are you saying you don't need this? You don't have routers or
any such? Then punt it.
Was I correct that the command is in your personal (graeme) crontab?
If so, just
crontab -e
and remove that line.
If, on the other hand, you want it to work, then move the command to
one of root's crontabs (/etc/cron.daily/ might be a good choice) and
remove the "root" part of the command. It might have made sense if it
was part of
su - root "some command"
but even that doesn't make sense in a crontab because it must ask you
for a password when it runs.
But "root" is not a command.
Cheers,
--
Bob McClure, Jr. Bobcat Open Systems, Inc.
robertmcclure earthlink net http://www.bobcatos.com
A backbone is better than a wishbone.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]