Date: Mon, 11 Dec 2000 18:22:40 +0100 From: Mark Huizer <freebsd@dohd.org> To: Giorgos Keramidas <keramida@ceid.upatras.gr> Cc: Alfred Perlstein <bright@wintelcom.net>, Dag-Erling Smorgrav <des@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/etc crontab Message-ID: <20001211182239.B20131@eeyore.local.dohd.org> In-Reply-To: <20001210171009.B1675@hades.hell.gr>; from keramida@ceid.upatras.gr on Sun, Dec 10, 2000 at 05:10:09PM %2B0200 References: <200012101254.eBACsZu99303@freefall.freebsd.org> <20001210052846.E16205@fw.wintelcom.net> <20001210171009.B1675@hades.hell.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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. Isn't it kind of easier to let periodic use a lock in /var/lock or something and synchronize that way? Mark -- Nice testing in little China... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001211182239.B20131>