crontab entry environment variables [PSARC/2007/503 FastTrack timeo
John Plocher
John.Plocher at Sun.COM
Wed Sep 12 13:42:35 PDT 2007
How about changing the spec to avoid this problem all together:
There is a knob that controls this behavior. The knob is
a special comment at the beginning of the crontab file itself:
#pragma envvariables={disallowed|singleton|shared}
With the default setting of "disallowed", it is a syntax error
for there to be lines of the form "^name=value$" in the crontab
file.
The user can place an entry in the crontab of either
#pragma envvariables=singleton
or
#pragma envvariables=shared
In either of these cases, ...include current spec...
With the "singleton" setting, a cron/env variable setting ONLY
effects the cron job entry immediately following the settings;
all such settings/values are dropped and not used for cronjob
entries that follow it in the file.
With the "shared" setting, the cron/env variables and their values are
remembered and passed on to all subsequent cronjob invocations
found in the file.
-John
Bill Sommerfeld wrote:
> On Mon, 2007-09-10 at 17:55 -0700, Don Cragun wrote:
>> 1. There is nothing in cron.1m nor in crontab.1 warning users that
>> they should not use the HOME, SHELL, or TZ variables in crontab
>> files that contain entries installed by more than one user or
>> application.
>
> I don't believe it's appropriate to have warnings against perfectly
> reasonable usage of the feature.
>
> What we need is a clear warning that the variable settings affect all
> successive entries and that administrators need to be on the lookout
> for unexpected side-effects.
>
> - Bill
>
>
>
> _______________________________________________
> opensolaris-arc mailing list
> opensolaris-arc at opensolaris.org
More information about the opensolaris-arc
mailing list