From owner-freebsd-questions@FreeBSD.ORG Fri May 11 19:34:29 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8881816A403 for ; Fri, 11 May 2007 19:34:29 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from smtp2.utdallas.edu (smtp2.utdallas.edu [129.110.10.33]) by mx1.freebsd.org (Postfix) with ESMTP id 691CC13C4E3 for ; Fri, 11 May 2007 19:34:29 +0000 (UTC) (envelope-from pauls@utdallas.edu) Received: from utd59514.utdallas.edu (utd59514.utdallas.edu [129.110.3.28]) by smtp2.utdallas.edu (Postfix) with ESMTP id BF9625AD24 for ; Fri, 11 May 2007 14:34:28 -0500 (CDT) Date: Fri, 11 May 2007 14:34:28 -0500 From: Paul Schmehl To: freebsd-questions@freebsd.org Message-ID: <7B18DD5BC0866A3F9B9EC7A3@utd59514.utdallas.edu> In-Reply-To: <002001c793fd$a789bfa0$dc96eed5@ihlasnetym> References: <002001c793fd$a789bfa0$dc96eed5@ihlasnetym> X-Mailer: Mulberry/4.0.6 (Linux/x86) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=sha1; protocol="application/pkcs7-signature"; boundary="==========E3B68BCA49281FA2BEE6==========" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Why crontab is not able to run some commands ? 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: Fri, 11 May 2007 19:34:29 -0000 --==========E3B68BCA49281FA2BEE6========== Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline --On Friday, May 11, 2007 21:53:24 +0300 Halid Faith =20 wrote: > > I have a script. As I am a root user, I can run it without a problem. I > added that script to crontab in order to run as automatic. > I entered in /etc/crontab and put down as below; > */20 * * * * root /etc/scriptfile > Try running this from the commandline: root /etc/scriptfile Bet it doesn't work. :-) Then try running this in your cron job: /bin/sh /etc/scriptfile Bet it does work. :-) --=20 Paul Schmehl (pauls@utdallas.edu) Senior Information Security Analyst The University of Texas at Dallas http://www.utdallas.edu/ir/security/ --==========E3B68BCA49281FA2BEE6==========--