Re: ENV vs BASH_ENV

Axl Purushu <[email protected]>
Newsgroups gmane.linux.admin
Message-ID <[email protected]>
I think that the path of the script may be an issue. When you setup
scripts in crontab its best to use absolute paths for all commands or
scripts.

-Anup
On Mon, 2008-07-21 at 17:58 +0200, Luca Ferrari wrote:
> Hi all,
> I cannot find out the difference between defining the two variables, but I 
> discovered after a lot that having both set up in my crontab avoids a script 
> to run correctly. For instance if I have in my crontab:
> 
> ENV=/home/luca/.profile
> BASH_ENV=/home/luca/.profile
> 
> then a shell script seems not to execute unless its output is redirect to a 
> file. So the line
> 
> 00 10 * * * myBackup.sh
> 
> does not seem to run (or starts and ends immediatly), while
> 
> 00 10 * * * myBackup.sh > /tmp/backup.log
> 
> works fine. If I run the backup script manually it works (it uses rsync). 
> What's the magic around the above variables?
> 
> Thanks,
> Luca
> --
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.