tickless cron

Denis Vlasenko vda.linux at googlemail.com
Sun Sep 24 21:52:02 UTC 2006


On Friday 01 September 2006 07:23, Rogelio Serrano wrote:
> On 9/1/06, Natanael Copa <natanael.copa at gmail.com> wrote:
> > On Fri, 2006-09-01 at 11:39 +0800, Rogelio Serrano wrote:
> > > is it possible to have tickless cron?
> >
> > Everything is possible. The impossible just take a little more time.
> >
> > > given a cron format schedule string can we compute the exact time of
> > > the next timeout?
> >
> > It is possible, but the question is if you want that. You would also
> > like to check if your crontab(s) has changed. But ofcourse, you could
> > use inotify for that.
> >
> > > the only algorithm i can come up with lists the exact day hour minute
> > > time and daily, weekly or monthly repetition specifier.
> >
> 
> what i mean is not have cron set a timer to one minute and evaluating
> all the schedules once a minute. the present crontab format works well
> in that mode becaue its just a straight comparison with the present
> time and the values in a crontab line which can actually be placed in
> a 'struct time'. what i would like to have is for cron to set the
> timer exactly to the next timeout. i have a tickless kernel and it
> does not make sense for cron the do exactly what i just removed from
> the kernel.

Just think what will happen if someone will set system time...

Periodic check every minute really isn't a load worth optimizing out.
--
vda



More information about the busybox mailing list