Re: cron scripts using ontape
Posted in 2000
When you run a script from the command line, the scripts inherits all of your
current environment variables, so it already knows about INFORMIXDIR and
ONCONFIG. What I do to solve this problem is to create an environment file in
my cron directory that all of my scripts read/execute. Your script will source
this file to get its environment (do not forget to set PATH in there). You can
always use your login .profile/.cshrc if you desire.
Make sure to test your cron using UNIX's 'at' command. It will help you to
debug the environment quickly and easily as it runs the job in a similar
fashion as cron (spawned process from the system scheduler).
SC
> Hello
> I'm new to this forum and need help running a script out of the cron using
> ontape. I get an error back of 'initgls'. I have been told this has
> something to do with the environmental variables but all the variables are
> defined in the script. The INFORMIXDIR, ONCONFIG, PATH and HOME setting are
> correct but the script won't run.
> However the script will run from the command line and it works fine.
> I am using Informix Dynamic Server 7.3.1 with a SunOS system. Any help is
> welcome.
> John Visicaro