How to specify bi-weekly crontab entries by day of the week?
suvayu ali
fatkasuvayu+linux at gmail.com
Sun Sep 18 23:13:24 UTC 2011
On Sun, Sep 18, 2011 at 3:30 PM, Remi Collet <Fedora at famillecollet.com> wrote:
> Le 18/09/2011 12:33, suvayu ali a écrit :
>> Hi,
>>
>> I have been trying to figure this out but so far haven't had any
>> success. I want to run jobs weekly, every 4 weeks (i.e. monthly) and
>> every 52 weeks (i.e. yearly) on a specific time on a Monday.
>>
>> I tried using the 1/<n> notation
>>
>> 00 2 * * 1/364 /usr/bin/rsnapshot -c /etc/rsnapshot.conf yearly
>> 20 2 * * 1/28 /usr/bin/rsnapshot -c /etc/rsnapshot.conf monthly
>> 40 2 * * 1 /usr/bin/rsnapshot -c /etc/rsnapshot.conf weekly
>
> # First monday of january
> 00 2 1-7 1 1 /usr/bin/rsnapshot -c /etc/rsnapshot.conf yearly
> # First monday of each month
> 20 2 1-7 * 1 /usr/bin/rsnapshot -c /etc/rsnapshot.conf monthly
> # All mondays
> 40 2 * * 1 /usr/bin/rsnapshot -c /etc/rsnapshot.conf weekly
>
This was exactly what I was hoping for. Thanks a lot Remi. :)
PS: @Frantisek: thanks for the script.
--
Suvayu
Open source is the future. It sets us free.
More information about the users
mailing list