LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   A mail from cron ... (http://www.linuxquestions.org/questions/linux-networking-3/a-mail-from-cron-435513/)

gabsik 04-15-2006 07:08 PM

A mail from cron ...
 
i keep on getting this mail sent by logcheck about cron:
Cron <root@argo> root run-parts --report /etc/cron.hourly
/bin/sh: line 1: root: command not found

I don' t really understand wherere that line from /bin/sh might be!/etc/cron.hourly it's a directory

argo:~# ls /etc/cron.daily/
5snort exim4-base logrotate modutils standard
bsdmainutils find man-db netkit-inetd sysklogd
chkrootkit fwlogwatch mixmaster .placeholder welcome2l

The mail i receive it's as like i wrote above that's it .. it does not says much who belongs that /bin/sh :line1 root: command not found!

:Pengy:

acid_kewpie 04-16-2006 02:10 PM

the line will be in /etc/cron, i'd guess you accidentally got a typo in there. show us the file and we'll see.

gabsik 04-17-2006 04:34 AM

That's right /etc/crontab has this line :
17 * * * * root run-parts --report /etc/cron.hourly

and this is the message in the mail i get:

Subject: Cron <root@argo> root run-parts --report /etc/cron.hourly
/bin/sh: line 1: root: command not found

It's an automatically generated cronjob the rest of the crontab is:

25 6 * * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily
47 6 * * 7 root test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly
52 6 1 * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly

What's anacron ??I will comment the first line but what was that line for ?What's the correct one?
Grazie!

acid_kewpie 04-17-2006 04:41 AM

anacron is an alternative to standard cron which will run jobs missed if th ebox was shutdown when the jobs were meant to run etc... normally they are kept wholly seperate, not normally in the same crontab.

the format of /etc/crontab is different to the user crontabs, edited via crontab -e in that it has that extra username column to specify what user each command runs as, as there is no user concept there. so it sounds like a system crontab entry has been put into a user crontab file, so that column is being used as the command, as it's not valid outside of /etc/crontab.


All times are GMT -5. The time now is 02:18 AM.