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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Backup script giving error when run by cron

Re: Backup script giving error when run by cron

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Thu, 19 Jul 2001 02:53:21 -0700
Message-ID: <F001.0034E4CA.20010719024519@fatcity.com>

Hallas John wrote:
>
> Probably your profile not being run correctly from the cron. We have
> several boxes (Tru64) where even though we are using cron from the
> oracle account we need to use the following syntax
>
> 00 19 * * * su - oracle -c '/usr/local/bin/script'
> otherwise the .profile is not run
>
> HTH
>
> John
> -----Original Message-----
> From: manivannan_m_at_indya.com [mailto:manivannan_m_at_indya.com]
> Sent: 19 July 01 08:41
> To: Multiple recipients of list ORACLE-L
> Subject: Backup script giving error when run by cron
>
> Hi gurus,
> Our database is running on Dynix in a Sequent machine.
> I tried to put the startup/shutdown script we use in crontab and
> schedule it.
> I call a script shut.sh which in turn will call the shutdown.sh
> script. But it gives me an error saying svrmgrl- not found. I've
> given here those scripts..
> What am I missing??

<snip>
> regards,
> Manivannan.M
>

The solution given above would work, but here the problem is that the profile is run in a subshell - and therefore any variable it sets is unavailable to the caller. It should be run as

 . <path>/.profile

--
Regards,

  Stephane Faroult
  Oriole Corporation
------------------------------------------------------------------
http://www.oriolecorp.com, designed by Oracle DBAs for Oracle DBAs
------------------------------------------------------------------
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriolecorp.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Jul 19 2001 - 04:53:21 CDT

Original text of this message

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