From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Wimmer Subject: Re: Cronjobs Date: Wed, 30 Jul 2003 10:05:16 +0200 Sender: linux-admin-owner@vger.kernel.org Message-ID: <20030730080516.GZ26455@gx.nl> References: Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Tom Troonbeeckx Cc: linux-admin@vger.kernel.org * Tom Troonbeeckx wrote on 30/Jul/2003 - 09:34:38 : > Dear Sir/Madam, > > I have some proplem with mine cronjobs. > > I edit mine /etc/crontab with the following command "crontab -e". > The crontab looks like this > > SHELL=/bin/bash > PATH=/sbin:/bin:/usr/sbin:/usr/bin > MAILTO=root > HOME=/ > > # run-parts > 01 * * * * root run-parts /etc/cron.hourly > 01 0 * * * root run-parts /etc/cron.daily > 30 14 * * * root run-parts /etc/cron.twice.a.day > 30 18 * * * root run-parts /etc/cron.twice.a.day > 22 4 * * 0 root run-parts /etc/cron.weekly > 42 4 1 * * root run-parts /etc/cron.monthly > 3,18,33,48 * * * * root run-parts /etc/cron.quarter-hourly > 1,6,11,16,21,26,31,36,41,46,51,56 * * * * root run-parts /etc/cron.5-min > > I restarted the anacron-daemon. I tested the cronjobs individually and they > work fine. > However, since I scheduled them I receive an email after each 5 and 15 > minutes with the message > /bin/bash: root: command not found > > I figured out that the crondaemon is trying to execute the command root. At > some point it doesn't count the userprivilege of the cronjob. > > The configuration looks in mine opinion fine. Any ideas what went wrong? > > Thanks in advance.... By using "crontab -e" you're editing your personal cron file (located in /var/spool/cron in RedHat) and there you don't need the user who is running the commands ... so leaving out "root" from your lines should help. old: 3,18,33,48 * * * * root run-parts /etc/cron.quarter-hourly new: 3,18,33,48 * * * * run-parts /etc/cron.quarter-hourly By the way - if you want some jobs running every 15 minutes you can use the syntax old: 3,18,33,48 * * * * root run-parts /etc/cron.quarter-hourly new: */15 * * * * run-parts /etc/cron.quarter-hourly as well (I have to admit that I don't know adhoc how you can start it at the third minute ;-} ). Hope this helps Stefan