[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cron



On Sat, Sep 27, 2003 at 01:45:05AM -0700, Tom wrote:
> On Sat, Sep 27, 2003 at 03:13:45AM -0500, Ron Johnson wrote:
> > On Sat, 2003-09-27 at 02:54, tb.nospam@comcast.net wrote:
> > > On Fri, Sep 26, 2003 at 09:47:07PM +0200, Stefan Waidele jun. wrote:
> > > > Howell Evans wrote:
> > > 
> > > That's amazing; I would have expected cron to have information to know 
> > > a priori when to wake up, rather than "polling"...
> > 
> > Waking up once a minute (which is a signal itself) to spend a 1/2
> > second reading some 5 line (yes, yes, they can be longer) text 
> > files is a *lot* simpler than having a signaling system for each 
> > crontab file.
> 
> I figured that is the argument -- too much work for too little payoff -- 
> and that's okay!
> 
> > 
> > > At the least it could optimize out obviously simple cases...
> > 
> > Like what?
> > 
> 
> Like the empty set.
> 
> Think about it: if a guy tells you to call him every hour, and a guy 
> tells you to call him every fifteen minutes, do you think every minute 
> about who to call?
> 

Or, thinking a bit, why not alloc 1440 bits, and once a day process 
all the files, setting a bit for which minute to wake up, and when I 
wake up, walk forward for the next set bit, and sleep that many minutes?
Do it all again if the files change...



Reply to: