Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!ucbvax!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.sources.d Subject: First monday of the month (was Re: v23i028: A cron/crontab replacement, Part01/01) Message-ID: <1990Oct14.065042.16216@iwarp.intel.com> Date: 14 Oct 90 06:50:42 GMT References: <2878@litchi.bbn.com> <49594@olivea.atc.olivetti.com> <8083@gollum.twg.com> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 43 In-Reply-To: david@twg.com (David S. Herron) In article <8083@gollum.twg.com>, david@twg (David S. Herron) writes: | In my most previous job I was working with a bunch of former IBM-ers | in a financial reporting sort of environment. One of the things they | wanted, and was surprised that cron was unable to do this "cleanly", | was to have a job run on (for instance): | | the first monday of the month | | The "nth monday of the month" class of specification would be a | very good addition. Arrgghhghgh! This was hashed, rehashed, and overhashed in comp.unix.wizards (back when there *was* one). The answer is that an unbroken cron (one more or less derived from V7) can do this easily with: 10 3 1-7 * 1 some-command some-parameter (to launch at 3:10 on the first monday of the month). However, later versions of cron are broken, because some stupid f**king student or suit-and-tie type decided to *or* together the day-of-week and day-of-month fields, rather than *and*ing them, in which case there's no way to do it without having "some-command" decide if it's the right time of the month. (If he/she wanted to add 'or'-ing, it should have been through a separate syntax... not breaking existing logic.) I'd really like the moron that came up with this misfeature to step forward and take his or her collective beating on the net. High hopes, though. He/she probably doesn't even read the net, and lives in some cave running System V (blech) UNIX on a 386 (blech) box when he/she isn't running DOS (double blech). (Sorry, it's been a bad night. But it feels better now. :-) Just another UNIX hacker since the V6 days, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/