From owner-svn-src-all@FreeBSD.ORG Tue Oct 16 06:05:03 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CD54141B; Tue, 16 Oct 2012 06:05:03 +0000 (UTC) (envelope-from netch@segfault.kiev.ua) Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by mx1.freebsd.org (Postfix) with ESMTP id 4F97E8FC08; Tue, 16 Oct 2012 06:05:02 +0000 (UTC) Received: from segfault.kiev.ua (localhost.segfault.kiev.ua [127.0.0.1]) by segfault.kiev.ua (8.14.5/8.14.5/8.Who.Cares) with ESMTP id q9G64u3x065646; Tue, 16 Oct 2012 09:04:56 +0300 (EEST) (envelope-from netch@segfault.kiev.ua) Received: (from netch@localhost) by segfault.kiev.ua (8.14.5/8.14.5/Submit) id q9G64pXh065643; Tue, 16 Oct 2012 09:04:51 +0300 (EEST) (envelope-from netch) Date: Tue, 16 Oct 2012 09:04:51 +0300 From: Valentin Nechayev To: Adrian Chadd Subject: Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib Message-ID: <20121016060451.GZ94815@netch.kiev.ua> References: <201210150821.q9F8Lobc047576@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-42: On Cc: svn-src-head@freebsd.org, Maxim Sobolev , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 06:05:03 -0000 Mon, Oct 15, 2012 at 15:45:37, adrian wrote about "Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib": > Why not sleep for the amonut of time needed before the next event? If you do this for all events listed currently in all crontabs, you need event engine. Currently request to recheck crontabs each minute masks the need to build event list. Switching this to 1-second step breaks former success. But we still can do something like if (per_second_requests_count > 0) sleep(1); else sleep_until_next_minute_margin(); as soon as there will be really few systems where @every_second is used. -netch-