Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Cron scripts

Re: Cron scripts

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sun, 06 Jun 1999 00:24:37 GMT
Message-ID: <375ebf99.10808511@newshost.us.oracle.com>


A copy of this was sent to "Brian Peasland" <peasland_at_email.msn.com> (if that email address didn't require changing) On Sat, 5 Jun 1999 17:15:24 -0500, you wrote:

>I've been trying to create a script which I'll be executing through cron.
>When I run the script, everything works just fine. When I schedule the
>script through crontab, it doesn't work. And I can't see what the cron
>script is doing. Any ideas how to find out the "output" from the run of a
>cron script?
>
>Here's what I'm trying to do:
>in a script,
> change SID
> sqlplus userid @script < passwordfile
> mail results
> do again for another SID
>
>The script contains a spool command to spool the results of the script to a
>file. That file is sent to my email account. When I run this script through
>the command line, it works just fine. When I run it through crontab, the
>spool file is empty and I get mailed nothing. Any ideas?
>
>Thanks in advance,
>Brian Peasland
>peasland_at_msn.com
>

the cron job runs in a pristine environment. things such as your PATH, ORACLE_HOME and so on *are not set*.

set the entire environment in your script and it'll go ok...

See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Sat Jun 05 1999 - 19:24:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US