> > 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?

Well, by frequently hitting your web server and having it look in the
database to decide to do nothing, you're putting a lot of unnecessary stress
on your server.  What's wrong with making individual cron jobs that call
individual URLs (think of it as RPC) to cause actions on your web server
exactly when you want them done?  Doesn't that sound a whole lot simpler?
- Perrin

Reply via email to