From owner-freebsd-questions Mon Nov 5 6:35:37 2001 Delivered-To: freebsd-questions@freebsd.org Received: from valen.gwi.net (valen.gwi.net [207.5.128.33]) by hub.freebsd.org (Postfix) with ESMTP id 6ED6D37B405 for ; Mon, 5 Nov 2001 06:35:33 -0800 (PST) Received: from ABERRATION (dieselgeek.outofspec.com [207.5.188.11]) by valen.gwi.net (8.11.6/8.11.6) with SMTP id fA5EZWS08062 for ; Mon, 5 Nov 2001 09:35:32 -0500 (EST) Message-ID: <008201c16607$1e2f5ff0$fa01a8c0@ABERRATION> Reply-To: "Predius" From: "Predius" To: References: <512fe501a6.501a6512fe@mbox.com.au> <3.0.5.32.20011105075659.01006480@mail.sage-american.com> Subject: Re: A cron job to run every 4 weeks Date: Mon, 5 Nov 2001 09:35:29 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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 It's hackish but, set a weekly cron job, say every sunday that runs a wrapper. The wrapper incriments a counter in a status file, when the counter hits 4, you reset the counter and the wrapper initiates whatever proc you wanted to run. Joshua Coombs ----- Original Message ----- From: To: ; "BSD Freak" Cc: "FreeBSD Questions" Sent: Monday, November 05, 2001 8:56 AM Subject: Re: A cron job to run every 4 weeks > 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 > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message