Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2012 09:04:51 +0300
From:      Valentin Nechayev <netch@netch.kiev.ua>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        svn-src-head@freebsd.org, Maxim Sobolev <sobomax@freebsd.org>, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r241576 - in head/usr.sbin/cron: cron crontab lib
Message-ID:  <20121016060451.GZ94815@netch.kiev.ua>
In-Reply-To: <CAJ-VmomRx_n6LoXeQCPAX-KzVYqPcjhZt1J0MX89FiEEojPePw@mail.gmail.com>
References:  <201210150821.q9F8Lobc047576@svn.freebsd.org> <CAJ-VmomRx_n6LoXeQCPAX-KzVYqPcjhZt1J0MX89FiEEojPePw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
 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-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121016060451.GZ94815>