Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] crontab - "and' condition
Date: Thu, 18 Sep 2014 17:15:27
Message-Id: 541B12DD.5070105@gmail.com
In Reply to: [gentoo-user] crontab - "and' condition by Joseph
1 On 18/09/2014 18:44, Joseph wrote:
2 > I want to run a cron job only once a month. The problem is the computer
3 > is only on on weekdays Mon-Fri. 1-5
4 >
5 > cron tab as this below is an "or" condition as it has entries in Days of
6 > the Months and Day of the Week
7 >
8 > 5 18 1 * 2 rsync -av ...
9 >
10 > so it will run on days 1 or Tuesday of each months.
11 >
12 > Is it possible to create "and" condition, eg. run it on Tuesday between
13 > days 1 to 7; depend on which day Tuesday falls on?
14
15
16 Not in one line.
17
18 Split it into two crontab entries.
19
20
21
22 --
23 Alan McKinnon
24 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] crontab - "and' condition Joseph <syscon780@×××××.com>