crontab entry environment variables [PSARC/2007/503 FastTrack timeo

Chris Gerhard chris at thegerhards.com
Thu Sep 13 04:39:48 PDT 2007


Bill Sommerfeld wrote:
> On Wed, 2007-09-12 at 17:02 -0700, John Plocher wrote:
>> If RedHat/Ubuntu does it in a particular way, we should
>> consider doing it in exactly the same way.  Being different
>> from Linux in these sorts of situations is a liability.
> 
>>From a few minutes of googling:
> 
> Red Hat appears to use a derivative of Paul Vixie's cron implementation.
> I haven't found their source but it appears that Paul's latest release
> can be found at 
> 
> 	http://ftp.isc.org/isc/cron/cron_4.1.shar 
> 
> Based on reading several of the files in that distribution, it appears
> that Vixie cron has supported an arbitrary-environment-variable setting
> extension similar to what was originally proposed in this case since at
> least 1988.
> 


The one difference with the extension I propose over Paul Vixie's cron 
is that the Vixie cron does not act on the TZ variable when set. All the 
scheduling is based on the TZ of the system not the TZ currently in play 
for that cron entry.

For example the Vixie cron when faced with entries like this:

TZ=UTC
6 12 * * * echo 12 `date`

Ran it at 1206 local time but the date command reported 1106 UTC.

My extension would run this job at 1206 UTC.

Now I feel my extension makes more sense than the the Vixie cron but if 
you have desire to be like linux this will be a difference.

I did my comparison on cron 3.0 so it is possible that the Vixie cron 
4.0 now supports TZ in the same way as my extension but have not found a 
system with it.

--chris



More information about the opensolaris-arc mailing list