From owner-freebsd-doc@FreeBSD.ORG Thu May 31 11:30:07 2007 Return-Path: X-Original-To: freebsd-doc@hub.freebsd.org Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6283916A469 for ; Thu, 31 May 2007 11:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 431FA13C480 for ; Thu, 31 May 2007 11:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l4VBU6ux036056 for ; Thu, 31 May 2007 11:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l4VBU6KR036055; Thu, 31 May 2007 11:30:06 GMT (envelope-from gnats) Resent-Date: Thu, 31 May 2007 11:30:06 GMT Resent-Message-Id: <200705311130.l4VBU6KR036055@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Raphael Becker" Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6211716A469 for ; 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 ; 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" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: rabe@rabe.uugrn.org Subject: docs/113194: crontab.5: handling of day-in-month plus day-in-week seems to be a bug/feature? X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2007 11:30:07 -0000 >Number: 113194 >Category: docs >Synopsis: 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: >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: