[Bug 104809] cron(8): incorrect cron behavior with mday field = "*/N"
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Apr 20 03:39:41 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=104809
Kyle Evans <bsdports at kyle-evans.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bsdports at kyle-evans.net
--- Comment #1 from Kyle Evans <bsdports at kyle-evans.net> ---
Hello!
It's been a long time with no response and you probably know this by now, but
for anyone that may stumble upon this- this is actually intended, albeit quirky
to the uninitiated, behavior.
The expression "*/5" is not mathematical division but instead a step function,
where "/5" indicates every 5 units of the range "*". crontab(5) documents "*"
as expanded to "first-last", and allowed values for day of the month being
1-31. This would indicate that "*/5" expands to "start-end/5" to "1-31/5,"
meaning "every 5 units starting at 1."
That being said, 1-31/5 *should* fire at 1,6,11,16,21,26,31. If it were
mathematical division, it would instead fire at 5,10,15,20,25,30.
"Works as intended"
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list