From owner-freebsd-questions Mon Nov 5 5:58:29 2001 Delivered-To: freebsd-questions@freebsd.org Received: from sage-american.com (sage-american.com [216.122.141.44]) by hub.freebsd.org (Postfix) with ESMTP id 491AD37B405 for ; Mon, 5 Nov 2001 05:58:25 -0800 (PST) Received: from sageone (adsl-208-191-227-27.dsl.crchtx.swbell.net [208.191.227.27]) by sage-american.com (8.9.3/8.9.3) with SMTP id HAA23641; Mon, 5 Nov 2001 07:56:44 -0600 (CST) Message-Id: <3.0.5.32.20011105075659.01006480@mail.sage-american.com> X-Sender: jacks@mail.sage-american.com X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Mon, 05 Nov 2001 07:56:59 -0600 To: smorton@acm.org, BSD Freak From: jacks@sage-american.com Subject: Re: A cron job to run every 4 weeks Cc: FreeBSD Questions In-Reply-To: <3BE63310.5010001@verizon.net> References: <512fe501a6.501a6512fe@mbox.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG You could set it as follows to at least do it every month (almost every 4 weeks) #minute hour mday month wday command 0 4 1 * * ~/scripts/myscript ... or include the "date" command in your script perhaps to pick the day... but that is getting more complicated than the above... At 01:34 AM 11.5.2001 -0500, Simon Morton wrote: >BSD Freak wrote: > >> Hiya all again.... >> >> I need to set a cron job to do something at 4am on Monday every 4 weeks >> (not every month). I have put the following in (as a regular user using >> crontab -e) : >> >> #minute hour mday month wday command >> 0 4 * * 1/4 ~/scripts/myscript >> >> >> I think that this is incorrect, but I'm not sure...couldn't find any >> good info on something like this...... Also if this is correct, when >> will it start from? This monday? Next monday? When will it start >> counting down the 4 weeks? > > >man 5 crontab > >However I suspect you'll find crontab can't do what you want. You will >probably need to schedule your script every Monday and have it only do >something every 4th time it is called. > >Simon > >-- >http://www.SimonMorton.com >smorton at acm dot org >\rm -rf /bin/laden > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message > > Best regards, Jack L. Stone, Server Admin Sage-American http://www.sage-american.com jacks@sage-american.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message