From owner-freebsd-questions@FreeBSD.ORG Fri May 11 20:10:55 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 7EE0B16A400 for ; Fri, 11 May 2007 20:10:55 +0000 (UTC) (envelope-from d.hill@yournetplus.com) Received: from duane.dbq.yournetplus.com (duane.dbq.yournetplus.com [65.124.230.214]) by mx1.freebsd.org (Postfix) with ESMTP id 55B8613C457 for ; Fri, 11 May 2007 20:10:55 +0000 (UTC) (envelope-from d.hill@yournetplus.com) Received: by duane.dbq.yournetplus.com (Postfix, from userid 58) id 08D3928F885; Fri, 11 May 2007 20:10:55 +0000 (UTC) X-Spam-ASN: X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on duane.dbq.yournetplus.com X-Spam-Level: X-Spam-Status: Reqd:5.0 Hits:-1.4 Learn:no Tests:ALL_TRUSTED=-1.44, DKIM_POLICY_SIGNSOME=0.001 Received: from duane.dbq.yournetplus.com (duane.dbq.yournetplus.com [192.168.1.10]) by duane.dbq.yournetplus.com (Postfix) with ESMTP id 79E7728F881 for ; Fri, 11 May 2007 20:10:54 +0000 (UTC) Date: Fri, 11 May 2007 20:10:54 +0000 (UTC) From: Duane Hill X-X-Sender: d.hill@duane.dbq.yournetplus.com To: freebsd-questions@freebsd.org In-Reply-To: <332E8FBDDDFF59A09A61B060@utd59514.utdallas.edu> Message-ID: <20070511200851.E20501@duane.dbq.yournetplus.com> References: <002001c793fd$a789bfa0$dc96eed5@ihlasnetym> <7B18DD5BC0866A3F9B9EC7A3@utd59514.utdallas.edu> <20070511194316.N20096@duane.dbq.yournetplus.com> <332E8FBDDDFF59A09A61B060@utd59514.utdallas.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 20:10:55 -0000 On Fri, 11 May 2007, Paul Schmehl wrote: > --On Friday, May 11, 2007 19:45:22 +0000 Duane Hill > wrote: > >> On Fri, 11 May 2007, Paul Schmehl wrote: >> >>> >>> Then try running this in your cron job: >>> /bin/sh /etc/scriptfile >>> >>> Bet it does work. :-) >> >> Yes, but if the OP has: >> >> # !/bin/sh >> >> as the first line, the file owned by root and the executable flag for >> user set, shouldn't it execute from cron as just: >> >> /etc/scriptfile >> >> ?? >> > Yes, but I always like cron jobs to specifically call absolute path to the > binary of choice. That way someone couldn't substitute a different binary by > altering the path and force a cron job to do something unexpected. True. Thanks for the tip.