On 10.03.19 21:05, Markus Ueberall wrote:
>   # m h dom mon dow user  command
>   00 05 1-7 1,3,5,7,9,11 SAT      sys-maint       some-task some-option   
> #host1
>   00 05 8-14 1,3,5,7,9,11 SAT     sys-maint       some-task some-option   
> #host2
>   00 05 15-21 1,3,5,7,9,11 SAT    sys-maint       some-task some-option   
> #host3
>   00 05 22-28 1,3,5,7,9,11 SAT    sys-maint       some-task some-option   
> #host4

> The expectation was that none of the entries is executed in parallel
> at any given point in time due to column three> (day-of-month range)

This frequently occurring mistake is an unfortunate result of the
crontab(5) specification.

Quoting the man page:
> Note: The day of a command's execution can be specified by two fields —
> day of month, and day of week. If both fields are restricted (i.e.,
> aren't *), the command will be run when either field matches the current
> time. For example, ``30 4 1,15 * 5'' would cause a command to be run at
> 4:30 am on the 1st and 15th of each month, plus  every Friday.

In short: it's not dom AND dow, but dom OR dow.

Consequently, your specification of SAT in column 5 trumps your
specification of column 3.

The man page contains an example for how to work around this.

-- 
Christian Kastner


** Changed in: cron (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1819369

Title:
  When specifying minute,hour,day-of-month,month,day-of-week
  values/ranges, given day-of-month range is *ignored*

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cron/+bug/1819369/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to