How to specify bi-weekly crontab entries by day of the week?

Remi Collet Fedora at FamilleCollet.com
Sun Sep 18 13:30:20 UTC 2011


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

Remi.


More information about the users mailing list