Path: utzoo!attcan!uunet!jarthur!usc!srhqla!quad1!ttidca!alter From: alter@ttidca.TTI.COM (Steve Alter) Newsgroups: comp.unix.wizards Subject: Re: Cron - First Saturday of the month Message-ID: <19137@ttidca.TTI.COM> Date: 15 Aug 90 01:46:48 GMT References: <19744@orstcs.CS.ORST.EDU> Organization: Citicorp/TTI, Santa Monica Lines: 26 In article <19744@orstcs.CS.ORST.EDU> curt@oce.orst.edu (Curt Vandetta) writes: } I'm wondering if anyone has a way of making cron run a job on the } first Saturday of every month? I'm going to totally side-step the fight that has been waged over whether the day-of-week is logically ANDed or ORed with the day-of-month. You can set it up using a combination of cron and "at". For example, let's assume that you want the job to run at 1 a.m. on the first Saturday of each month. You put in a cron job to run at 12:30 a.m. on the 1st DAY of each month, and have that cron job launch an "at" job to run at 1 a.m. on the next Saturday, which could be as soon as 30 minutes later. Tweak the names and numbers to your heart's delight, but the concept remains. The cron line (SunOS 4.x): 30 0 1 * * /home/myacct/bin/next.Saturday The next.Saturday script (mode 755): at -c 0100 Sat first.Saturday.of.month File "first.Saturday.of.month" contains... oh, you can figure it out. -- Steve Alter {csun,philabs,psivax,pyramid,quad1,rdlvax,retix}!ttidca!alter Citicorp/TTI, Santa Monica CA (213) 450-9111 x2541