[Info-ingres] Fw: Overriding II_TIMEZONE_NAME in a bash script running under crontab

Chris Clark Chris.Clark at actian.com
Sun Jan 22 04:56:57 UTC 2017


ingsetenv isn't temporary. Using shell "env" is probably a better option here which is local in scope (and does not require admin rights).

Chris

From: info-ingres-bounces at lists.planetingres.org [mailto:info-ingres-bounces at lists.planetingres.org] On Behalf Of Allan Biggs
Sent: Saturday, January 21, 2017 8:49 AM
To: info-ingres at lists.planetingres.org
Subject: [Info-ingres] Fw: Overriding II_TIMEZONE_NAME in a bash script running under crontab

----- Forwarded by Allan Biggs/GB/CONT/DPT on 21/01/2017 16:48 -----

From:        Allan Biggs/GB/CONT/DPT
To:        info-ingres-request at kettleriverconsulting.com<mailto:info-ingres-request at kettleriverconsulting.com>, openroad-users at googlegroups.com<mailto:openroad-users at googlegroups.com>
Date:        21/01/2017 16:36
Subject:        Overriding II_TIMEZONE_NAME in a bash script running under crontab
________________________________





on a Linux box I happen to want to temporarily change time zone whilst running a crontab job.
This script only gets called when the parent script is running in crontab

. /home/ingres/.ingIIsh
echo  "------------------"
ingsetenv II_TIMEZONE_NAME UNITED-KINGDOM
echo " in only_fromcrontab  $(date)"
ingprenv
echo  "------------------"

The script did not change II_TIMEZONE_NAME


Although I don't want to do it I tried

ingsetenv II_TIMEZONE_NAME UNITED-KINGDOM interactively

and got
ingsetenv: unable to set variable "II_TIMEZONE_NAME"
        E_CL1405_NM_STOPN       NM[sg]tIngAt: Unable to open symbol table
        only the Ingres super-user can use ingsetenv

Clearly the bash script is failing in the same way.

Is there a way of  temporarily overriding the time zone in a script which doesn't require super-user privileges?

thanks
Allan

This communication is for use by the intended recipient and contains
information that may be Privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender by
return e-mail and delete this e-mail from your system. Unless explicitly
and conspicuously designated as "E-Contract Intended", this e-mail does
not constitute a contract offer, a contract amendment, or an acceptance
of a contract offer. This e-mail does not constitute a consent to the
use of sender's contact information for direct marketing purposes or for
transfers of data to third parties.

Francais Deutsch Italiano  Espanol  Portugues  Japanese  Chinese  Korean

          http://www.DuPont.com/corp/email_disclaimer.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20170122/329abea5/attachment.html>


More information about the Info-ingres mailing list