Bob Beck <[email protected]> wrote:

> On Mon, Apr 13, 2020 at 09:23:23PM -0600, Todd C. Miller wrote:
> > On Mon, 13 Apr 2020 20:27:30 -0600, Bob Beck wrote:
> > 
> > > In my hearts desire I'd love for "R" to be chosen for each line once at 
> > > start
> > > up. (so in
> > > the above example the things are randomly distributed).  but not sure how 
> > > har
> > > d that is..
> > >
> > > If it saves code and effort I really think this is only useful for hours 
> > > and 
> > > minutes
> > 
> > Here's a version that uses a suggestion from Theo to support ranges
> > like "0~30" to mean a random number between 0 and 30 and just a
> > bare "~" to mean a random value in the valid range for that field.
> > 
> > The random values are chosen when the file is parsed which means
> > that on reload due to crontab edit they will change.  I was trying
> > to avoid that initially but now I don't think it is a big deal.
> 
> Like this one plenty.  I think it's ok the values change on reload. 

The main benefit this brings is is slop within a region of an hour.
For instance, randomly in the start or end of the hour,  0~29 or 39~59.
Trashing is easier to avoid.

I never liked cron starting a shell, which runs a random sleep before
doing work. In particular, the "crontab -e" behaviour when such a
sleeping process has already been started is just ugly.

It will won't quite help the rpki-client situation.  That may need some
additional intelligence.

Reply via email to