From owner-freebsd-questions Thu Sep 14 0:17:21 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost01.reflexnet.net (mailhost01.reflexnet.net [64.6.192.82]) by hub.freebsd.org (Postfix) with ESMTP id 7D2A537B424 for ; Thu, 14 Sep 2000 00:17:11 -0700 (PDT) Received: from 149.211.6.64.reflexcom.com ([64.6.211.149]) by mailhost01.reflexnet.net with Microsoft SMTPSVC(5.5.1877.197.19); Thu, 14 Sep 2000 00:15:59 -0700 Received: (from cjc@localhost) by 149.211.6.64.reflexcom.com (8.11.0/8.11.0) id e8E7H4O84519; Thu, 14 Sep 2000 00:17:04 -0700 (PDT) (envelope-from cjc) Date: Thu, 14 Sep 2000 00:17:04 -0700 From: "Crist J . Clark" To: Tony Fleisher Cc: Andre Albsmeier , freebsd-questions@FreeBSD.ORG Subject: Re: crontab entry Message-ID: <20000914001704.R69158@149.211.6.64.reflexcom.com> Reply-To: cjclark@alum.mit.edu References: <20000914083428.A20675@curry.mchp.siemens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from takhus@takhus.mind.net on Wed, Sep 13, 2000 at 11:49:11PM -0700 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Sep 13, 2000 at 11:49:11PM -0700, Tony Fleisher wrote: > On Thu, 14 Sep 2000, Andre Albsmeier wrote: > > > I am looking for a crontab entry that runs my command on > > the first thursday of every month at 6 am. I thought the > > following would work but it doesn't: > > > > AFAIK, this cannot be done with a crontab entry. However, you may be able > to wrap /path/to/my/command with a script that exits if the day of the > month is greater than 7, and then use a crontab entry that simply > specifies to run on every thursday. No need for a wrapper, just put it all in the crontab, 0 6 * * 4 if [ `date +\%d` -le 7 ]; then /path/to/my/command; fi -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message