Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!dptg!ulysses!andante!alice!debra From: debra@alice.UUCP (Paul De Bra) Newsgroups: comp.unix.questions Subject: Re: How does one specify 'second Tuesday' in a crontab? Message-ID: <9805@alice.UUCP> Date: 22 Aug 89 17:53:34 GMT References: <7613@c3pe.UUCP> <1794@crdgw1.crd.ge.com> Reply-To: debra@alice.UUCP () Distribution: usa Organization: AT&T, Bell Labs Lines: 29 In article <1794@crdgw1.crd.ge.com> davidsen@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@research.att.com | uunet!research!debra | ------------------------------------------------------