Re: Cron reporting root command not found
David.Knight-kugt9ekRjqdWk0Htik3J/[email protected] Wed, 20 Jun 2007 09:22:20 -0500
| Newsgroups | gmane.linux.redhat.release.taroon.general |
|---|---|
| Message-ID | <OF7F21BDF5.8340C7C2-ON86257300.004E52CE-86257300.004EF32F@clubcorp.com> |
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