From rabe@top.uugrn.org  Thu May 31 11:26:25 2007
Return-Path: <rabe@top.uugrn.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 6211716A469
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 31 May 2007 11:26:25 +0000 (UTC)
	(envelope-from rabe@top.uugrn.org)
Received: from top.uugrn.org (top.uugrn.org [195.49.138.97])
	by mx1.freebsd.org (Postfix) with ESMTP id D9FA913C455
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 31 May 2007 11:26:24 +0000 (UTC)
	(envelope-from rabe@top.uugrn.org)
Received: from top.uugrn.org (localhost.uugrn.org [127.0.0.1])
	by top.uugrn.org (8.13.8/8.13.8) with ESMTP id l4VAt3G4091730;
	Thu, 31 May 2007 12:55:03 +0200 (CEST)
	(envelope-from rabe@top.uugrn.org)
Received: (from root@localhost)
	by top.uugrn.org (8.13.8/8.13.8/Submit) id l4VAt2q0091729;
	Thu, 31 May 2007 12:55:02 +0200 (CEST)
	(envelope-from rabe)
Message-Id: <200705311055.l4VAt2q0091729@top.uugrn.org>
Date: Thu, 31 May 2007 12:55:02 +0200 (CEST)
From: "Raphael Becker" <rabe@uugrn.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: rabe@rabe.uugrn.org
Subject: crontab.5: handling of day-in-month plus day-in-week seems to be a bug/feature?
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         113194
>Category:       docs
>Synopsis:       [patch] [request] crontab.5: handling of day-in-month plus day-in-week seems to be a bug/feature?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 31 11:30:06 GMT 2007
>Closed-Date:    
>Last-Modified:  Mon Jan 28 09:19:46 UTC 2008
>Originator:     Raphael Becker
>Release:        FreeBSD 6.2-RELEASE-p1 i386
>Organization:
UUGRN e.V. 
>Environment:
System: FreeBSD top.uugrn.org 6.2-RELEASE-p1 FreeBSD 6.2-RELEASE-p1 #1: Sun Feb 18 19:59:49 CET 2007 root@top.uugrn.org:/usr/obj/usr/src_RELENG_6_2/sys/TOP i386


	
>Description:
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.
>How-To-Repeat:
	
>Fix:

--- crontab.5.orig      Thu May 31 12:24:47 2007
+++ crontab.5   Thu May 31 12:27:05 2007
@@ -208,17 +208,6 @@
 after the first % will be sent to the command as standard
 input.
 .Pp
-Note: The day of a command's execution can be specified by two
-fields \(em day of month, and day of week.
-If both fields are
-restricted (ie, are not *), the command will be run when
-.Em 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.
-.Pp
 Instead of the first five fields,
 one of eight special strings may appear:
 .Bd -literal -offset indent
@@ -295,6 +284,17 @@
 .Sh AUTHORS
 .An Paul Vixie Aq paul@vix.com
 .Sh BUGS
+Note: The day of a command's execution can be specified by two
+fields \(em day of month, and day of week.
+If both fields are
+restricted (ie, are not *), the command will be run when
+.Em 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.
+.Pp
 If you are in one of the 70-odd countries that observe Daylight
 Savings Time, jobs scheduled during the rollback or advance will be
 affected.

>Release-Note:
>Audit-Trail:
>Unformatted:
