Matt Sergeant wrote:

> > as for putting cron into Apache: I don't understand why that's wanted
> > in the first place. When connecting to the database outside the httpd
> > it doesn't matter if it goes a little slow. And having separate
> > programs to do the maintenance would easily be much simpler than
> > trying to drop everything into the httpd.
> 
> Its just a convenience thing. I've wanted to be able to do this too, for
> example to have emails go off at a particular interval. So yes, it can be
> done as cron + URI, but I'm just jealous of AOLServer's ability to do it
> all in one. This is especially important for a shrink-wrapped type
> application, where asking people to install a crontab entry is just
> another pain in the installation process (note that cron might be
> different on different OS's, and so might the shell be, so this is a real
> problem for some people - whereas if it were in Apache we'd know the
> platform).

Same reasons here for wishing for this. By the way, it could even be
done as "cron + perl script that does the job directly (outside of
Apache)", but I'm trying to integrate things, so that you start one DBMS
daemon and N Apache servers (on different machines, of course), and you
have the application running.

As you mention, there is also the problem of being cross-platform.
Apache and mod_perl runs on Windows, but I would have to make people get
themselve a cron for Windows?

I think that I *will* make an Apache::Schedule module, but much less
ambitious and more closely related to the way Apache and mod_perl do
things. What about this summary:

Apache::Schedule let you register callbacks (per Apache child process)
that will be called after a given amount of time has passed, either once
or repeatedly. Callbacks will be called at the next request after the
required time, or at child exit time.

Would anyone find that useful? Of course, you can always run it from
cron. Or make yourself a daemon. Or use POE. Or use Zope. Or (even) use
AOLserver. TMTOWTDI.

Is there a mod_perl for AOLserver? ;-)

-- 
"Unix was not designed to stop you from doing stupid things, because
that would also stop you from doing clever things." -- Doug Gwyn

Reply via email to