Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] cron - once a month during week days
Date: Thu, 05 Feb 2015 19:44:47
Message-Id: 54D3C7EC.8070400@gmail.com
In Reply to: [gentoo-user] cron - once a month during week days by Joseph
1 On 05/02/2015 21:19, Joseph wrote:
2 > I have a cron tab entry:
3 > 8 12 1-7 * 1 rsync ...
4 >
5 > I was under impression that it will run once a month on Monday but it
6 > seems to be running every day, why?
7 >
8
9
10 As Florian explained, crontab syntax gets weird when you use fields 3 and 5.
11
12 Basically, what you want to do cannot be done in a plain crontab. You
13 might be able to leverage anacron to accomplish what you want.
14
15 Otherwise, you must write a wrapper script that runs daily or on Mondays
16 and checks a flag file that it creates and only run once in a given month
17
18
19 --
20 Alan McKinnon
21 alan.mckinnon@×××××.com

Replies

Subject Author
[gentoo-user] Re: cron - once a month during week days James <wireless@×××××××××××.com>
Re: [gentoo-user] cron - once a month during week days Rich Freeman <rich0@g.o>