[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] cron error mail



> Jiju Thomas Mathew wrote:
> > > I am having no files in /etc/cron.hourly. I have following line in
> > > crontab for hour.
> > > 1 * * * * root run-parts /etc/cron.hourly.
> >                   ^^^
> > this is what makes the error, remark the hourly line by putting a # in
> > front.
> > > /bin/bash: root: command not found
>
root is no command, but one minute past every hour, cron tries to run what
is inside
cron.hourly, does not find any thing to run hence 'command not found'.

I went over this and dumped this to /etc/cron.hourly/dohour
#!/bin/bash
echo "done now" > /dev/null
and done
chmod u+x /etc/cron.hourly/dohour

this has done the trick and now no error messages on the hour.
----------------------------------------------------------------------------
--------
Jiju Thomas Mathew
Linux registered user #154193 -- http://counter.li.org




--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.