Bug 113194

Summary: [patch] [request] crontab.5: handling of day-in-month plus day-in-week seems to be a bug/feature?
Product: Documentation Reporter: rabe
Component: Manual PagesAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Works As Intended    
Severity: Affects Only Me CC: doc, kevans, rabe
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description rabe 2007-05-31 12:30:06 UTC
If you try to express "monday before second thursday in month" 
(announce for our monthly UUG meeting) you might want to setup 
a cron like 

	0 0 5-11 * 1 ~/bin/announce.sh

Following the "Note" (see patch) section about the two day-fields 
this would end in

	"every day from 5th to 11th plus every monday". 

Therefore you cannot express "monday before second thursday in month".

If the behaviour of the two fields would be logical "and" it should work 
and if you really need to express "every day from 5th to 11th plus every
monday" you easily could set up two lines with an asterisk for the 3rd or
the 5th field.

So we have some unneded redundancy here plus the lack of a reasonable 
facility. So this "feature" should go into the "Bugs" section of crontab.5

Maybe someone would patch the behaviour.
Comment 1 Kyle Evans freebsd_committer freebsd_triage 2017-04-20 03:21:09 UTC
(In reply to rabe from comment #0)

Hi from the future,

The behavior here is actually intended, and it would be rather jarring to many if this were to change. This is also how it works on pretty much every *nix-like server I've worked on, so suddenly documenting it as a bug when its behavior is quite deliberate and consistent with other cron implementations would also be rather jarring.

Ultimately, I think this is a "works as intended" all around.