How does one specify 'second Tuesday' in a crontab?

Paul De Bra debra at alice.UUCP
Wed Aug 23 03:53:34 AEST 1989


In article <1794 at crdgw1.crd.ge.com> davidsen at crdos1.UUCP (bill davidsen) writes:
>The implementation of cron is really stupid! They could have allowed
>both day of week and day of month with two lines and then anded the day
>of week/month fields to do what you want.
>

The implementation that takes the "or" of day of month and day of week
is not just stupid, it is wrong.

The manual page (ninth edition unix) has an example:

daemon 0 12 22-28 11 4  mail turkey % time's up: thanksgiving dinner

I haven't checked whether this actually works, but it's clear that the
intention is to have it work. Furthermore the manual says that:
"an asterisk means all legal values", so an entry
0 0 1 1 * under the "or" interpretation would mean execute this at
midnight, in january, on the first or on any day of the week, which would
imply that the line is executed every single day in january. It is clear
that this is NOT done by any implementation of cron I know of.
So the behaviour for * actually implies that cron should NOT take the
"or" of the day of month and day of week.

Paul.

-- 
------------------------------------------------------
|debra at research.att.com   | uunet!research!debra     |
------------------------------------------------------



More information about the Comp.unix.questions mailing list