On 2024/07/04 00:01, Jason McIntyre wrote:
> On Wed, Jul 03, 2024 at 10:08:09PM +0100, Stuart Henderson wrote:
> > > 
> > >      A random value (within the legal range) may be obtained by using the 
> > > ???~???
> > >      character in a field.  The interval of the random value may be 
> > > specified
> > >      explicitly, for example ???0~30??? will result in a random value 
> > > between 0
> > >      and 30 inclusive.  If either (or both) of the numbers on either side 
> > > of
> > >      the ???~??? are omitted, the appropriate limit (low or high) for the 
> > > field
> > >      will be used.  The '~' character gets expanded to a random value
> > >      only once, at table install time.
> > 
> > "only once, at table install time" doesn't seem quite clear to me.
> > In particular consider "only once" when you edit the crontab once,
> > then edit it again.
> > 
> > How about this?
> > 
> > The '~' character gets expanded to a random value when the
> > .Nm crontab
> > is loaded.
> > 
> 
> well, we already say "A random value ... may be obtained", which i
> think is equivalent (note the singular). and this text does not
> explicitly say that it remains at this value afterwards, which is what
> we are supposed to be addressing.
> 
> i still don;t think the complexity of the text is warranted. it works
> how it works. will someone stop using "random" because of this, or
> somehow be caught out (genuinely asking)?

People could get caught out, because another job might run with more
or less than the expected interval. Really depends what it's used for.
For something like the rpki-client example in src/etc/crontab it doesn't
matter much. For scheduling something once a week on a random day, it
needs a bit more careful thought. For once a month on a random date,
~ is very likely to be a bad idea, a reboot or making any change to
the file (including one that doesn't touch the line with ~) will trip
you up.

> i'm not trying to reject the suggestion. i just think that being
> explicit will add a level of complexity that won;t be an improvement. i
> did try to rework the text! for example:
> 
>       A random, fixed, value...
> 
> it's still not explicit ;(
> 
>       Once loaded, this value remains constant.

that would be very misleading - if the crontab is loaded again,
the value will change.

> don;t know...
> 
> jmc
> 
> > "The allowed values for the fields" above misses the various
> > possibilities involving ~ too.
> > 
> 

Reply via email to