Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!wyse!bob From: bob@wyse.wyse.com (Bob McGowen x4312 dept208) Newsgroups: comp.unix.wizards Subject: Re: Cron - First Saturday of the month Message-ID: <2847@wyse.wyse.com> Date: 10 Aug 90 02:40:29 GMT References: <19744@orstcs.CS.ORST.EDU> <1990Aug8.185745.16606@iwarp.intel.com> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen x4312 dept208) Organization: Wyse Technology Lines: 32 In article <1990Aug8.185745.16606@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes: >In article <19744@orstcs.CS.ORST.EDU>, curt@oce (Curt Vandetta) writes: >| I'm wondering if anyone has a way of making cron run a job on the >| first Saturday of every month? > >3 4 1-7 * 6 command > >to make 'command' run at 4:03am... adjust the first two fields as >necessary. Remember, the parameters are "and"-ed together. ...flame deleted My documentation states that a line like the one you have provided would cause the command to run on EVERY Saturday as well as on each of the first seven days in the month. My flame-- I would be very interested if you could provide a cron only method of getting my cron to execute on the first Saturday (or any other day) such that it executes on that single day only. My attempts at solving this have been to combine cron to run the command on Saturday and have command be a script that checks the date to be sure it is less than or equal to 7. But this only works for the first 13 days so I have to figure out the next exclusion, probably to limit between a start and stop. In any case, getting cron to do what Curt wants is a little more difficult. Possibly (probably, I think) even wizard caliber. Bob McGowan (standard disclaimer, these are my own ...) Product Support, Wyse Technology, San Jose, CA ..!uunet!wyse!bob bob@wyse.com