Perrin Harkins wrote:

> > Well, if I call the "check for things to do" URI every minute, then I'll
> > be just fine. Many times, I'll just check and find nothing to do
> 
> Huh?  Why would you call it if there's nothing to do?  Are you thinking
> you'll write a cron-ish task/timing spec for your Perl app and just use
> the cron triggers as a constant clock?

Yes, exactly. My plan is to have a table with the tasks in my database,
and check expired tasks in a cleanup handler. I'll have to lock the
table, so that only one process does that. I'll also query the database
only every so often, not at every request cleanup.

The more hits I get, the more accurate the "cron" will be, but I think I
will use a cron trigger a request to have a minimum level of accuracy
(could be every half-hour, just to make sure we're never late by more
than that, or whatever is appropriate).

Anything better?

-- 
"Unix gives you just enough rope to hang yourself -- and then a couple
of more feet, just to be sure." -- Eric Allman

Reply via email to