Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2000 09:20:16 +0200
From:      Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To:        cjclark@alum.mit.edu
Cc:        Tony Fleisher <takhus@takhus.mind.net>, Andre Albsmeier <andre.albsmeier@mchp.siemens.de>, freebsd-questions@FreeBSD.ORG
Subject:   Re: crontab entry
Message-ID:  <20000914092016.B42003@curry.mchp.siemens.de>
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
References:  <20000914083428.A20675@curry.mchp.siemens.de> <Pine.BSF.4.21.0009132343090.3824-100000@takhus-home.ashlandfn.org> <20000914001704.R69158@149.211.6.64.reflexcom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000914092016.B42003>