RE: Need help on Unix Cron job to submit onautovop
Posted in 1999
Topics: Backup & Restore
Sunny, Cron doesn't know any variables when it kicks off jobs. You must therefore set the variables in your script(s), or have your scripts source other files to get those variables set. In you start_autovop script, explicitly set INFORMIXDIR=/informix/7.22 just before the first "echo" statement. > -----Original Message----- > From: Sunny Shi [SMTP:sunnyshi@mediaone.net] > Sent: Tuesday, January 12, 1999 5:03 PM > To: informix-list@iiug.org > Subject: Need help on Unix Cron job to submit onautovop > > Hi, Everyone. I am trying to using cron job to submit the onautovop > process in the evening for my onarchive backup. > > I used the cron_autovop utility provided by Informix. It created a cron > tab. The cron tab job activatied at the given time. But it gave me a > message of: > > /informix/7.22/bin/start_autovop[45]: /bin/onautovop: not found. > > Here is the cron tab line: > > /informix/7.22/bin/start_autovop 1 1>/dev/null 2>/dev/null > > Then I try to submit the above on the command line, every thing ran OK. > > I don't know why, the cron is trying to search onautovop at /bin > directory where in the start_autovop script it's pointing to the > $INFORMIXDIR/bin(where $INFORMIXDIR is /informix/7.22) == > /informix/7.22/bin directory. > > Attached is a text document of the start_autovop script. > > Thank you very much in advance for your help. > > My email: sunnyshi@mediaone.net > Phone: 847-534-6073 > > Sunny Shi << File: START_~1.TXT >>
\\\\ When you create scripts or profile users I suggest the following. (I also request open critisism.) In your informix directory create a directory $INFORMIXDIR/local/bin In this directory, or any you chose, create a file that contains all your environmental variables. There could be many different files located here that any person login in or script could call. The script would need to contain the essentials and everything you would want, i.e., path to informix stuff, informix dir, and lots of other goodies. It would then be "sourced" in your script in the following manner as a single line in a script or .profile " . /myinformixpath/plussub/directories/tosaid/sourcefilename " Locate all environmental configs here and point all users here as needed. I can't think of a negative aspect of any part of this but am willing to learn from ANY experienced person on the web Thanks in advance don In article <77gj9k$qr9$1@news.xmission.com>, Stephen Faehn <sfaehn@havatampa.com> wrote: > > Sunny, > Cron doesn't know any variables when it kicks off jobs. > You must therefore set the variables in your script(s), > or have your scripts source other files to get those variables set. > > In you start_autovop script, explicitly set INFORMIXDIR=/informix/7.22 > just before the first "echo" statement. > > > -----Original Message----- > > From: Sunny Shi [SMTP:sunnyshi@mediaone.net] > > Sent: Tuesday, January 12, 1999 5:03 PM > > To: informix-list@iiug.org > > Subject: Need help on Unix Cron job to submit onautovop > > > > Hi, Everyone. I am trying to using cron job to submit the onautovop > > process in the evening for my onarchive backup. > > > > I used the cron_autovop utility provided by Informix. It created a cron > > tab. The cron tab job activatied at the given time. But it gave me a > > message of: > > > > /informix/7.22/bin/start_autovop[45]: /bin/onautovop: not found. > > > > Here is the cron tab line: > > > > /informix/7.22/bin/start_autovop 1 1>/dev/null 2>/dev/null > > > > Then I try to submit the above on the command line, every thing ran OK. > > > > I don't know why, the cron is trying to search onautovop at /bin > > directory where in the start_autovop script it's pointing to the > > $INFORMIXDIR/bin(where $INFORMIXDIR is /informix/7.22) == > > /informix/7.22/bin directory. > > > > Attached is a text document of the start_autovop script. > > > > Thank you very much in advance for your help. > > > > My email: sunnyshi@mediaone.net > > Phone: 847-534-6073 > > > > Sunny Shi << File: START_~1.TXT >> > -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own