in reply to Perl/UNIX permissions/env

cron does not load your ~/.profile and the rest of your environment, so neither $ENV{ORACLE_HOME} nor the path are set up "properly". I usually write a small shell wrapper around my scripts that loads the environment by sourcing ~/.profile and whatever other configuration scripts there are to be loaded.

Replies are listed 'Best First'.
Re^2: Perl/UNIX permissions/env
by thor (Priest) on Jun 09, 2004 at 11:56 UTC
    A trick that we use around work is to login to the localhost in the cron. i.e.
    rsh localhost your_script
    This works regardless of what your shell is (bash, csh, zsh, etc).

    thor

Re^2: Perl/UNIX permissions/env
by nimdokk (Vicar) on Jun 09, 2004 at 17:38 UTC
    Something else would be to set $ENV{ORACLE_HOME} within the script itself. Although I'm not sure if this is always a good idea to do (I recall seeing some warnings about doing this).

    #!/usr/bin/perl $ENV{ORACLE_HOME}='/path/to/oracle/home'; (rest of code)