From owner-freebsd-questions Tue May 1 8:25:28 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ns2.sysadmin-inc.com (ns2.sysadmin-inc.com [209.16.228.145]) by hub.freebsd.org (Postfix) with SMTP id A8F4E37B424 for ; Tue, 1 May 2001 08:25:24 -0700 (PDT) (envelope-from peter@sysadmin-inc.com) Received: (qmail 60325 invoked by alias); 1 May 2001 15:25:19 -0000 Received: from unknown (HELO w2kstest) (209.16.228.146) by ns2.sysadmin-inc.com with SMTP; 1 May 2001 15:25:19 -0000 From: "Peter Brezny" To: Subject: Simple problem running scripts from cron Date: Tue, 1 May 2001 11:24:39 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I use a file very similar to the one below to compress backup files on a monthly basis. When i run the script from the console it works fine, however, when cron tries to run it, this error appears in the logs. /usr/bin/tar: can't exec bzip2 : No such file or directory Why does it work from the console, but not when cron tries to run it? Am i just missing a path statement to /usr/local/bin/bzip2 ? And would that syntax be: PATH=/usr/local/bin/ TIA Peter Brezny SysAdmin Services Inc. This is the script i'm running. #!/bin/sh (nice /usr/bin/tar cvflj /home/test.bz2 /home/peter/aaa)>/home/peter/test.bzip.log 2>&1 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message