Re: A Rather Basic Cron Question
Thanks to both Greg Wooledge and Reco.
Reco <firstname.lastname@example.org> writes:
> On Thu, Aug 23, 2018 at 01:29:30PM -0500, Martin McCormick wrote:
> > */5 5-12,13-23 * * * sh -c ". $HOME/.master.env; ./etc/do_mail"
> > In this case, no harm was done but shouldn't the cron
> > runs have stopped at 12:00 and then resumed at 13:00?
> No, it should not. It's a classic 'off by one' mistake:
> $ perl -e 'my @a = (eval "5..12,13..23"); print join ",", @a;'
> On the other hand,
> $ perl -e 'my @a = (eval "5..11,13..23"); print join ",", @a;'
> So 5-11,13-23 should do what you want.
I just wasn't thinking and even more, by specifying 1
hour of no runs, the effect would have been as if nothing had
happened. The run at 12:55 would have satisfied the criteria for
all the runs associated with 12:00 and then 13:00 would have
started a whole new sequence of */5 runs, making the schedule
By the way, that was a clever use of perl.