From owner-freebsd-questions Thu Sep 14 0:20:29 2000 Delivered-To: freebsd-questions@freebsd.org Received: from goliath.siemens.de (goliath2.siemens.de [192.35.17.28]) by hub.freebsd.org (Postfix) with ESMTP id 74C7737B424 for ; Thu, 14 Sep 2000 00:20:24 -0700 (PDT) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer goliath.siemens.de) Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.10.1/8.10.1) with ESMTP id e8E7KH312672; Thu, 14 Sep 2000 09:20:17 +0200 (MET DST) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail2.siemens.de (8.10.1/8.10.1) with ESMTP id e8E7KHd14130; Thu, 14 Sep 2000 09:20:17 +0200 (MET DST) Received: (from localhost) by curry.mchp.siemens.de (8.11.0/8.11.0) id e8E7KHo33440; Date: Thu, 14 Sep 2000 09:20:16 +0200 From: Andre Albsmeier To: cjclark@alum.mit.edu Cc: Tony Fleisher , Andre Albsmeier , freebsd-questions@FreeBSD.ORG Subject: Re: crontab entry Message-ID: <20000914092016.B42003@curry.mchp.siemens.de> References: <20000914083428.A20675@curry.mchp.siemens.de> <20000914001704.R69158@149.211.6.64.reflexcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20000914001704.R69158@149.211.6.64.reflexcom.com>; from cjclark@reflexnet.net on Thu, Sep 14, 2000 at 12:17:04AM -0700 X-Echelon: BND CIA NSA Mossad KGB MI6 IRA detonator nuclear assault strike Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 14-Sep-2000 at 00:17:04 -0700, Crist J . Clark wrote: > 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 I have done this now, thanks. -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message