On Tue, 13 Feb 2001, Pierre Phaneuf wrote:
> Matt Sergeant wrote:
>
> > Pretty much what you've already found out - Apache has no "cron" like
> > daemon. One way you can do it is fork off a sub-process and run some sort
> > of Cron perl module (I think there's a Cron module on CPAN, or you can run
> > cron-like features with POE).
>
> Hmm, too bad, that would have been easy to implement in the Apache core
> request processing loop (it's build into the core of AOLserver). I'll
> look to make sure, but I think this will be possible in Apache 2.0.
> Anyway, that doesn't fix my problem for now.
>
> Isn't forking off from Apache rather nasty? I saw something to that
> effect somewhere in the eagle book and on some web pages, but I think
> there are ways to do that without causing problems.
Yes, its a pain. I suggest using the ways detailed below. My only problem
with those ways is that its not controlled from your application
generally, unless you write your own cron-a-like in Perl, and access your
datastore to get the configuration.
> Perrin Harkins wrote:
>
> > The common way to do it is to just use the real cron facility (assuming you
> > are on unix) and have it call a URL on your server using LWP.
>
> I am on a Unix-like system, but I wanted the events to be updated by the
> web server itself, so that I could use the Apache::DBI cached connection
> to the DBMS (I want to store the events in there).
The cached connection will be used, just as it would for the rest of your
application. Also note that HTTP::GHTTP loads a *lot* faster than LWP, and
executes faster too. And yes, you can restrict that URL to localhost, or
password protected.
--
<Matt/>
/|| ** Director and CTO **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** Personal Web Site: http://sergeant.org/ **
\\//
//\\
// \\