From owner-freebsd-questions@FreeBSD.ORG Tue Sep 30 14:00:42 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 888B916A4B3 for ; Tue, 30 Sep 2003 14:00:42 -0700 (PDT) Received: from wopr.caltech.edu (wopr.caltech.edu [131.215.103.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE4574400D for ; Tue, 30 Sep 2003 14:00:41 -0700 (PDT) (envelope-from mph@wopr.caltech.edu) Received: from wopr.caltech.edu (localhost.caltech.edu [127.0.0.1]) by wopr.caltech.edu (8.12.9/8.12.9) with ESMTP id h8UL0fGL005138; Tue, 30 Sep 2003 14:00:41 -0700 (PDT) (envelope-from mph@wopr.caltech.edu) Received: (from mph@localhost) by wopr.caltech.edu (8.12.9/8.12.9/Submit) id h8UL0etO005137; Tue, 30 Sep 2003 14:00:40 -0700 (PDT) Date: Tue, 30 Sep 2003 14:00:40 -0700 From: Matthew Hunt To: Kai Grossjohann Message-ID: <20030930210040.GA5088@wopr.caltech.edu> References: <20030930164957.GL59342@ns2.wananchi.com> <20030930181029.GA2738@wopr.caltech.edu> <86d6di0zd7.fsf@slowfox.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86d6di0zd7.fsf@slowfox.dyndns.org> User-Agent: Mutt/1.5.1i cc: freebsd-questions@freebsd.org Subject: Re: complex crontab query X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2003 21:00:42 -0000 On Tue, Sep 30, 2003 at 10:56:20PM +0200, Kai Grossjohann wrote: > My understanding is that putting more than one condition in it > performs a logical conjunction. So wouldn't it work to do like this? > > # minute hour dom month dow command > 0 3 1-7 * 4 mycommand I thought that might be the case, but the man page says: # Commands are executed by cron(8) when the minute, hour, and month of # year fields match the current time, and when at least one of the two # day fields (day of month, or day of week) matches the current time # (see ``Note'' below). ... # Note: The day of a command's execution can be specified by two fields # -- day of month, and day of week. If both fields are restricted (ie, # aren't *), the command will be run when 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. -- Matthew Hunt * Salvage, like other forms of virtue, is http://www.pobox.com/~mph/ * its own reward. -George Reamerstaff