Re: Cron reporting root command not found
d.qureshi-7yFXA2EciJlaa/[email protected] Wed, 20 Jun 2007 15:54:23 +0100
| Newsgroups | gmane.linux.redhat.release.taroon.general |
|---|---|
| Message-ID | <[email protected]> |
When I do crontab -l it displays this below:- [root]# crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.8354 installed on Thu Jun 7 12:24:34 2007) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) # run system activity accounting tool every 10 minutes */10 * * * * root /usr/lib/sa/sa1 1 1 # generate a daily summary of process accounting at 23:53 53 23 * * * root /usr/lib/sa/sa2 -A # Cron job to track current date, memory usage and running processes #0-59/10 * * * * /root/memmon.sh >> /root/memmon.log [root]# [root]# [root]# When I look at /etc/crontab it displays this below:- [root]# cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly [root]# Does this give you a more details why I am getting a problem with cron? On Wed, 20 Jun 2007 09:22:20 -0500 David.Knight-kugt9ekRjqdWk0Htik3J/[email protected] wrote: > What crontab is it in? if you do a crontab -l is it there? or is it in > the /etc/crontab? > > Cron.daily will want a user to run the command, I.E: > 01 * * * * root run-parts /etc/cron.hourly > > Above root is the user to run the command, run-parts is the command and > /etc/cron.hourly is the option to the run-parts command. > However if you used crontab -e to edit the crontab, the crontab file will > be in /var/spool/cron/ (Unix style)... This crontab does not want the > user. it uses a user before the command. It manages a crontab per user... > I.E.: > [root@linux201 cron]# pwd > /var/spool/cron > [root@linux201 cron]# ls -l > total 8 > -rw------- 1 root root 54 Aug 29 2006 root > [root@linux201 cron]# cat root > 00 5 * * * /root/dr/dr.backup.ksh > > Hope this helps, > David Knight > > d.qureshi-7yFXA2EciJlaa/[email protected] > Sent by: [email protected] > 06/20/2007 09:12 AM > Please respond to > "Discussion of Red Hat Enterprise Linux 3 (Taroon)" > <[email protected]> > > To > [email protected] > cc > > Subject > Cron reporting root command not found > > I keep on getting this mail sent by logcheck about cron > > From: (Cron Daemon) > To: root > Subject: Cron <root@> root /usr/lib/sa/sa1 1 1 > X-Cron-Env: <SHELL=/bin/sh> > X-Cron-Env: <HOME=/root> > X-Cron-Env: <PATH=/usr/bin:/bin> > X-Cron-Env: <LOGNAME=root> > Status: O > > /bin/sh: line 1: root: command not found > > I don' t really understand why cron is mailing this to root? > > Can anyone help me why cron is complaining to root about line 1 and how > do I correct? > > -- > Taroon-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/taroon-list > -- Taroon-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/taroon-list