From owner-freebsd-questions@FreeBSD.ORG Tue Sep 30 10:07:00 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 809A916A4F3 for ; Tue, 30 Sep 2003 10:07:00 -0700 (PDT) Received: from remt30.cluster1.charter.net (remt30.cluster1.charter.net [209.225.8.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E5D34401F for ; Tue, 30 Sep 2003 10:06:59 -0700 (PDT) (envelope-from chowse@charter.net) Received: from [66.168.145.25] (HELO moe) by remt30.cluster1.charter.net (CommuniGate Pro SMTP 4.0.6) with ESMTP id 8737284; Tue, 30 Sep 2003 13:06:58 -0400 From: "Charles Howse" To: "'Odhiambo Washington'" , "'Free BSD Questions list'" Date: Tue, 30 Sep 2003 12:06:54 -0500 Message-ID: <001c01c38775$3fe93f80$04fea8c0@moe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <20030930164957.GL59342@ns2.wananchi.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal 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 17:07:00 -0000 > This question was asked and was answered by Crist J. Clark > some years gone. > Google could not help me so I beg to ask here: > > I would like to run a script via crontab every > > 1. 3rd day and 28th day of each month (seems easy) > 2. Every first Thursday of the month One solution would be to program the logic into your script, then run the script every day from crontab. Example bash pseudo-code: If day-of-month = 3 or 28 ; then do some stuff Elif day-of-month <= 7 and day-of-week = Thursday ; then do the same stuff fi