From owner-cvs-all Sun Dec 10 13: 1:12 2000 From owner-cvs-all@FreeBSD.ORG Sun Dec 10 13:01:07 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 143C837B400; Sun, 10 Dec 2000 13:01:07 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id eBAL14v05197; Sun, 10 Dec 2000 13:01:04 -0800 (PST) Date: Sun, 10 Dec 2000 13:01:04 -0800 From: Alfred Perlstein To: Giorgos Keramidas Cc: Dag-Erling Smorgrav , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/etc crontab Message-ID: <20001210130103.N16205@fw.wintelcom.net> References: <200012101254.eBACsZu99303@freefall.freebsd.org> <20001210052846.E16205@fw.wintelcom.net> <20001210171009.B1675@hades.hell.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001210171009.B1675@hades.hell.gr>; from keramida@ceid.upatras.gr on Sun, Dec 10, 2000 at 05:10:09PM +0200 Sender: bright@fw.wintelcom.net Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Giorgos Keramidas [001210 12:56] wrote: > On Sun, Dec 10, 2000 at 05:28:46AM -0800, Alfred Perlstein wrote: > > * Dag-Erling Smorgrav [001210 04:54] wrote: > > > des 2000/12/10 04:54:35 PST > > > > > > Modified files: > > > etc crontab > > > Log: > > > On Sundays through Fridays, run daily at 03:01 am. > > > On Saturdays, run daily and weekly sequentially, starting at 03:01 am. > > > > > > This prevents daily and weekly from overlapping, while running weekly as > > > early as possible (i.e. as soon as daily finishes) to give it time to > > > finish before monthly starts at 05:30 am. > > > > > > It's probably possible to do something similar with monthly, making it > > > run as soon as daily (and possibly weekly, if the first of the month > > > is a Saturday) finishes, but this is left as an exercise for the reader. > > > > why not have weekly run daily and monthly run weekly which then > > runs daily? > > Because there *will* be months that running monthly on their first day > is necessary, but that same day is not the 6-th day of a week, and > weekly doesn't need to run. To make sure that weekly will run after > monthly finishes, but only when the day of the month is 1, and day of > week is 6, one would need something like: > > 1 3 2-31 * 1-5,7 root periodic daily > 1 3 2-31 * 6 root periodic daily weekly > 1 3 1 * 1-5,7 root periodic daily monthly > 1 3 1 * 6 root periodic daily weekly monthly > > This will make sure that the succession of scripts will start at 03:01 > and run (in this order), daily -> weekly -> monthly. The rules that I > followed are: > > * Every day run daily first. Then maybe weekly, and maybe monthly. > * On first day of month, make sure that monthly starts after daily. > * If first day of month is also sixth day of week, interpolate weekly > between daily and monthly. > * On other days of the month run only daily. > * Except when day of week is the sixth, when weekly is run after > daily too. > > What still puzzles me is if that 2-31 will work correctly. But if you > review this and you like it, I'd happy to see it commited. I like this assuming it works. :) -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message