crontab entry environment variables [PSARC/2007/503 FastTracktimeout09/10/2007]
Roland Mainz
roland.mainz at nrubsig.org
Wed Sep 12 09:27:50 PDT 2007
Chris Gerhard wrote:
> Roland Mainz wrote:
> > Darren J Moffat wrote:
[snip]
> > 2. I have great concerns about the abuse of the global environment
> > variable namespace - sooner or later this will backfire _badly_ if cron
> > and other applications have slightly different ways to interpret the
> > values.
>
> It would if they did. However since cron is interpreting all the
> variables in the way you expect I fail to see how this is an issue. TZ
> is treated as the timezone. If we went with .cron.tz cron would still
> have to set TZ to match this otherwise you would have a cron job wiht
> .cron.tz set to PST but running on a system in UTC would have the job
> seeing time as UTC while scheduled in PST.
Two issues:
1. You basically assign a double-functionality to the variables - they
affect both cron internal behaviour and they are exported into the
environment of the launched cron job.
For example: What do you want to do if you use the timezone "a" for the
cron entries but run the cron job with the default system timezone ?
2. The scheme as described in the current ARC materials is not
extensible since you can't gurantee that you won't create namespace
clashes between variables which set/define cron-internal behaviour and
stuff which is exported into the environment (imagine you add a variable
called "VERSION" to define which version of the cron spec should be used
to interpret the cron entries - this would render the OS/Net build
defunct since environment variables override Makefile variables and
usr/src/Makefile.master contains a variable "VERSION" ... or short:
*BOOOOOM* ...).
Maybe you could say you only export a defined subset of these variables
(e.g. "SHELL", "HOME", "TZ") but that would make these other variables
more or less "local variables" and by the usual Unix shell conventions
such variable names should be at least spelled using lowercase
characters...
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
More information about the opensolaris-arc
mailing list