From owner-freebsd-questions@FreeBSD.ORG Mon Jul 17 17:38:06 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E35E716A4DE for ; Mon, 17 Jul 2006 17:38:06 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACD8E43D79 for ; Mon, 17 Jul 2006 17:37:53 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.7/8.13.7/Debian-1) with ESMTP id k6HHbYMT031982 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 17 Jul 2006 20:37:37 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.7/8.13.7) with ESMTP id k6HHbXcM013699; Mon, 17 Jul 2006 20:37:33 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.7/8.13.7/Submit) id k6HHbWZI013698; Mon, 17 Jul 2006 20:37:32 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 17 Jul 2006 20:37:32 +0300 From: Giorgos Keramidas To: perikillo Message-ID: <20060717173732.GA13654@gothmog.pc> References: <51d7a5160607171017v148af14v2c838ca5bd129b87@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51d7a5160607171017v148af14v2c838ca5bd129b87@mail.gmail.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.738, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.66, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: User crontab file dosent run...? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2006 17:38:07 -0000 On 2006-07-17 10:17, perikillo wrote: > Hi people. > > Im testing how to run scripts from cron using the crontab program, > the handbook say tha each user need to have a crontab file if they > want to run some process with the cron program: > > user-x$ crontab -e > > SHELL=/bin/sh > PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin > MAILTO=root > */1 * * * * user-x /bin/echo "Testing" The /etc/crontab file is *NOT* the same as the user crontab files. It has an extra field, at column 6, which specifies which user this entry will run as. In user crontabs, the sixth field is the command-name, as below: | $ crontab -l | PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/home/giorgos/bin | | # Email me calendar entries at 00:00 every day | @daily /usr/bin/calendar | | # Save backup copies of my Mercurial repositories in /g/repos | 0,10,20,30,40,50 * * * * /home/giorgos/cron.d/repos-gker | | # Save backup copies of my Mercurial repositories in /g/repos | #3,13,23,33,43,53 * * * * /home/giorgos/cron.d/repos-bmi | | # Rotate all log files under `/home/giorgos/log', according to the | # options specified in the `/home/giorgos/log/newsyslog.conf' file. | #8,18,28,38,48,58 * * * * /home/giorgos/cron.d/logrotate | $ So, your user crontab entry tries to run a command called `user-x', which does not exist of course...