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 |