Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Nov 2001 07:56:59 -0600
From:      jacks@sage-american.com
To:        smorton@acm.org, BSD Freak <bsd-freak@mbox.com.au>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: A cron job to run every 4 weeks
Message-ID:  <3.0.5.32.20011105075659.01006480@mail.sage-american.com>
In-Reply-To: <3BE63310.5010001@verizon.net>
References:  <512fe501a6.501a6512fe@mbox.com.au>

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




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