On Tue, Mar 22, 2005 at 10:58:11AM +0000, Gaby vanhegan wrote:
> Just to confirm:
>
> # Monthly full backup run, on the first thursday of the month
> 0 17 1-7 * 4 sudo -u operator
> /usr/local/sbin/amcheck -m ltsn_full
> 45 0 1-7 * 4 sudo -u operator
> /usr/local/sbin/amdump ltsn_full
>
> This crontab entry will run amanda for the ltsn_full configuration
> *only* on the first thursday of every month?
Two things,
1) As you do, I used to believe the relationship of DOM and DOW
(day of month/week) was an AND type relationship. So the data
and time would have to match 1-7 AND 4. But it is not. Instead
it is an OR relationship. Any of the first 7 days, or Thursdays.
Here is the relevant sentence from the OpenGroup man pages for
crontab.
Finally, if either the month or day of month is specified
as an element or list, and the day of week is also specified
as an element or list, then any day matching either the month
and day of month, or the day of week, shall be matched.
In the above, an element is something other than an asterix ("*").
The way to handle what you want to do is start a script from a
crontab. The script will determine if it is appropriate to start
the amdump or amcheck. The script could run every day and check
for DOM 1-7/DOW 4, or it could run every DOW 4 and check DOM 1-7,
or every DOM 1-7 and check for DOW 4.
2) You are running amcheck at 5 PM, 16 hours AFTER the amdump has
already run. It is too late to do anything about the amcheck
then. Remember, the 12:45 AM you probably meant is the next
day, Friday. In fact, 5 PM may be too late anyway. Will you
be there to check your mail after 5?
--
Jon H. LaBadie jon AT jgcomp DOT com
JG Computing
4455 Province Line Road (609) 252-0159
Princeton, NJ 08540-4322 (609) 683-7220 (fax)
|