Date: Mon, 5 Nov 2001 09:35:29 -0500 From: "Predius" <predius@netzero.net> To: <freebsd-questions@freebsd.org> Subject: Re: A cron job to run every 4 weeks Message-ID: <008201c16607$1e2f5ff0$fa01a8c0@ABERRATION> References: <512fe501a6.501a6512fe@mbox.com.au> <3.0.5.32.20011105075659.01006480@mail.sage-american.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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: <jacks@sage-american.com> To: <smorton@acm.org>; "BSD Freak" <bsd-freak@mbox.com.au> Cc: "FreeBSD Questions" <freebsd-questions@FreeBSD.ORG> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008201c16607$1e2f5ff0$fa01a8c0>