Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2001 11:24:39 -0400
From:      "Peter Brezny" <peter@sysadmin-inc.com>
To:        <freebsd-questions@freebsd.org>
Subject:   Simple problem running scripts from cron
Message-ID:  <MFEFLELMIJGKDKPCJHAFKEFGCBAA.peter@sysadmin-inc.com>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?MFEFLELMIJGKDKPCJHAFKEFGCBAA.peter>