Re: Running Informix on Cron
Posted in 1995
>From: Stephen Wakeford <ad31@ns.cityscape.co.uk> >Date: Fri, 20 Oct 1995 20:57:19 +0100 >X-Informix-List-Id: <news.18126> > >Does anyone know of a FAQ on running informix in cron scripts (Solaris >2.4)? We want to run some batch progams overnight. The Informix FAQ does not have any significant information on running Informix programs under cron -- Kerry, please note. The rules are very simple: (1) The program should not rely on having a terminal connected. (2) The environment needs to be set correctly. Item (1) means, in general, that I4GL programs using INPUT or other screen mode operations (including DISPLAY AT) are unreliable, but plain DISPLAY statements and reports are fine. ISQL can be run in the batch mode to interpret SQL scripts, and to run ACE reports (or to compile reports or forms), but running forms or using menus or the schema editor, etc, is error-prone at best. Item (2) means that cron should be told to run a script which sets the complete environment for the program. When cron runs a job, it has a completely minimal environment: typically, the environment variables HOME, LOGNAME, PATH are set to default values (PATH is probably just /usr/bin on Solaris 2.4), and that is about it. If you're lucky, you'll get TZ and HZ set too. So, depending on the version of Informix you are running, where you have Informix installed, and what your cron-run jobs are doing, you may need to set: INFORMIXDIR -- probably PATH -- definitely INFORMIXSERVER -- 6.00 and up SQLEXEC -- 5.0x and down, maybe SQLRM -- 5.0x, maybe SQLRMDIR -- 5.0x, maybe DBPATH -- possibly DBDATE -- if you aren't in the USA DBMONEY -- if you aren't in the USA DBFORMAT -- if you aren't in the USA You may want to set many other environment variables. Some of these may be defaults for your application system; others will be less commonly used Informix variables. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>