Bug 113194 - [patch] [request] crontab.5: handling of day-in-month plus day-in-week seems to be a bug/feature?
Summary: [patch] [request] crontab.5: handling of day-in-month plus day-in-week seems ...
Status: Closed Works As Intended
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-31 12:30 UTC by rabe
Modified: 2018-08-05 06:29 UTC (History)
3 users (show)

See Also:


Attachments
file.diff (1.22 KB, patch)
2007-05-31 12:30 UTC, rabe
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.