How does one specify 'second Tuesday' in a crontab?
Charles Green
charles at c3pe.UUCP
Sat Aug 19 02:24:12 AEST 1989
I'd like to run a program on, say, the second Tuesday of each month. I thought
10 20 8-14 * 2 command
would be a sufficient specification, since the only time that a logical 'and of
all fields is satisfied is at 20:10 on a Tuesday between the 8th and 14th,
inclusive; i.e., the second Tuesday.
However, it appears that the logical 'or' of the day-of-week and day-of-month
fields is being taken, instead; i.e., 'command' gets run on each of the days
between the 8th and the 14th and, probably, on every Tuesday besides. One of
my UNIX manuals bears this out.
I've checked this out on two different systems (a Masscomp running 4.0A and a
Convergent MightyFrame running 5.22) and get the same results. Can someone
tell me if there's a way to specify the desired action, short of having 'cron'
run a script which first checks the date to determine validity, *then* does
the command?
Thanks, Charles Green charles%c3pe at decuac.dec.com
--
{decuac.dec.com,cucstud,sundc}!c3pe!charles ex::!echo Boo:
More information about the Comp.unix.questions
mailing list