at(1) and cron(8) (was: Re: Regarding randomized times in crontab)

2020-04-19 Thread zeurkous
Just as a note for the future: mefeels that it'd be great (for clarity as well as simplicity) if cron(8) would be merged into at(1) at some point: % echo make-coffee | at teatime every day (Or similar.) Such a change would allow each job to be individually manipulated, as well. --zeurk

Re: Regarding randomized times in crontab

2020-04-18 Thread Andreas Kusalananda Kähäri
On Sat, Apr 18, 2020 at 10:56:09AM -0600, Theo de Raadt wrote: > Raul Miller wrote: > > > On Sat, Apr 18, 2020 at 12:25 PM Aham Brahmasmi > > wrote: > > > The examples and Theo's reply helped in understanding the nuance. It > > > might seem logical and common sense on further thought, as Janne

Re: Regarding randomized times in crontab

2020-04-18 Thread Theo de Raadt
Raul Miller wrote: > On Sat, Apr 18, 2020 at 12:25 PM Aham Brahmasmi > wrote: > > The examples and Theo's reply helped in understanding the nuance. It > > might seem logical and common sense on further thought, as Janne has > > pointed out. But at least in my case, it was not immediately appare

Re: Regarding randomized times in crontab

2020-04-18 Thread Raul Miller
On Sat, Apr 18, 2020 at 12:25 PM Aham Brahmasmi wrote: > The examples and Theo's reply helped in understanding the nuance. It > might seem logical and common sense on further thought, as Janne has > pointed out. But at least in my case, it was not immediately apparent. Yeah, after rethinking it,

Re: Regarding randomized times in crontab

2020-04-18 Thread Aham Brahmasmi
Namaste Andreas, > Sent: Friday, April 17, 2020 at 8:53 AM > From: "Andreas Kusalananda Kähäri" > To: "Janne Johansson" > Cc: "openbsd-misc" > Subject: Re: Regarding randomized times in crontab > > On Fri, Apr 17, 2020 at 09:06:10AM +0200, Jan

Re: Regarding randomized times in crontab

2020-04-17 Thread Andreas Kusalananda Kähäri
On Fri, Apr 17, 2020 at 09:06:10AM +0200, Janne Johansson wrote: > Den tors 16 apr. 2020 kl 20:22 skrev Andreas Kusalananda Kähäri < > andreas.kah...@abc.se>: > > > On Thu, Apr 16, 2020 at 11:14:59AM -0600, Theo de Raadt wrote: > > > That is a lot of words to cover a simple concept: > > > > > > Th

Re: Regarding randomized times in crontab

2020-04-17 Thread Janne Johansson
Den tors 16 apr. 2020 kl 20:22 skrev Andreas Kusalananda Kähäri < andreas.kah...@abc.se>: > On Thu, Apr 16, 2020 at 11:14:59AM -0600, Theo de Raadt wrote: > > That is a lot of words to cover a simple concept: > > > > The specific random values are selected when cron(5) loads > > the crontab file.

Re: Regarding randomized times in crontab

2020-04-16 Thread Andreas Kusalananda Kähäri
On Thu, Apr 16, 2020 at 11:14:59AM -0600, Theo de Raadt wrote: > That is a lot of words to cover a simple concept: > > The specific random values are selected when cron(5) loads > the crontab file. New numbers are chosen when crontab -e is used. > > If you understand that, the conclusions are obv

Re: Regarding randomized times in crontab

2020-04-16 Thread Theo de Raadt
That is a lot of words to cover a simple concept: The specific random values are selected when cron(5) loads the crontab file. New numbers are chosen when crontab -e is used. If you understand that, the conclusions are obvious. Raul Miller wrote: > That's a poorly phrased question, to be hone

Re: Regarding randomized times in crontab

2020-04-16 Thread Raul Miller
That's a poorly phrased question, to be honest. In one sense the point in time where the job is scheduled has to be different -- it's a point in time in a different 24 hour period. But in another sense (a sense closer to what you probably intended) the point in time can't be guaranteed to be diff

Re: Regarding randomized times in crontab

2020-04-16 Thread Andreas Kusalananda Kähäri
Thanks for that! Also, considering a job scheduled like ~ ~ * * * somecommand I'm assuming, provided that the cron daemon is not restarted, this would run the job at a single random point in each 24h period, right? A *different* point in time, each 24 period? On Thu, Apr 16, 2020 at

Re: Regarding randomized times in crontab

2020-04-16 Thread Theo de Raadt
Yes. But that problem already existed with the minutes field being >close to the moment cron was restarted. Only difference is now you don't know the minute. Andreas Kusalananda Kähäri wrote: > Thanks for the ~ crontab(5) feature! > > Question: If the cron daemon is restarted (e.g. via reboo

Regarding randomized times in crontab

2020-04-16 Thread Andreas Kusalananda Kähäri
Thanks for the ~ crontab(5) feature! Question: If the cron daemon is restarted (e.g. via reboot) during the interval during which a cron job may be randomly triggered, is there a risk (or even guarantee) that the job may run a second time? Regards, -- Andreas (Kusalananda) Kähäri SciLifeLab, N