Web lists-archives.com

Re: A Rather Basic Cron Question




On Thu, Aug 23, 2018 at 01:29:30PM -0500, Martin McCormick wrote:
> */5 5-23 * * * sh -c ". $HOME/.master.env; ./etc/do_mail"

Note, the sh -c is redundant.  The line is already passed to sh.  You
could just do:

  */5 5-23 * * * . ~/.master.env; ./etc/do_mail

> 
> I modified it to read
> 
> */5 5-12,13-23 * * * sh -c ". $HOME/.master.env; ./etc/do_mail"

That's identical to your previous line.  You haven't changed anything.

> When I tried that line, it still continued to run every 5 minutes
> between 12:00 and 13:00

If you want it *not* to run between 12 and 13 o'clock, try:

  */5 5-11,13-23 * * * ...