Re: Why following ksh script not works in crontab?
Posted in 1998
On Thu, 24 Sep 1998 14:35:51 +0100, Peter Lancashire wrote: %Ruiming Chen wrote: %> [troublesome cron job snipped] %> Description: Card for Chui /Chen, Raymond/Ruiming %I agree with Jonathan and Neil about the environment. I have found (also %by bitter experience) that the only way to ensure that Informix software %works wherever it is used is to put ALL the environment settings in a %SINGLE source file and call that as a shell source (with dot). You do %this from the cron job and you can guarantee it will have the same %environment as all the rest of your programs. It would also solve the %problems posted here about the environment given to programs run by the %SPL SYSTEM statement. Seems like a good candidate for a FAQ. Of course, after spending the last 2 weeks working off and on with the Informix on Linux FAQ, everything seems like a FAQ candidate. There is nothing new under the sun in c.d.i. ... %If an Informix manual writer is reading this, perhaps he or she could %include the advice in the next issue? Even better, perhaps a dummy %commented file, including ALL the environment variables (they are %growing like topsy) could be sent as part of the distribution. This also %applies to the ".rc" file too. Thus would one more source of grief for %new installers be removed. This is just my impression after about four years working with various RDBMSs: most of the big installations seems to use one or more global initialization scripts or env files to set all of these variables and "typically" source them (at least in the UNIX world, can't say about Windows or others) at the top of the program. It still seems like a FAQ. Kurt -- Linux: The little OS that could, does and will.