Hi, Say hypothetically that I want a certain block of code to run every 5 minutes.
Would I... a) fork() off a child process in a script loaded up with a PerlRequire directive in the httpd.conf? b) Use $r->register_cleanup(...) to handle the fork()ing and all that? (kludgy because of forking off a whole new server process) c) Simply use a cron job to execute a different script? (But how would I get the Apache::ASP objects? [$Server/$Session/$Application]) d) Use a cron job to execute code that sends an http request to an ASP page on the server? (Even though this works great, it seems wrong somehow). It might not be platform-independent, but it would be nice to spawn a separate thread (not a fork()ed process) to take care of things. For Win32 we could use Win32::Process < http://search.cpan.org/~gsar/libwin32-0.191/Process/Process.pm > on Windows and Threads or forks < http://search.cpan.org/~elizabeth/forks-0.15/lib/forks.pm > for non-windows systems. I imagine something like my $id = $Server->add_recurring_event( sub{ ... }, 60*60*5 ); for something to run every 5 minutes. And $Server->end_recurring_event( $id ); to stop the recurring event from executing. Something like JavaScript's window.setInterval("alert('This is an interval!')", 60*60*5) and window.clearInterval( <id> ); I could use something like this to manage cached database connections, rotate logs, update a "who's online" list, clean out unused sessions, etc. If there is already a clean way to do this that I am simply not aware of, I would like a pointer in the right direction. And if this is not currently available, I would like to take a stab at making it available. Thanks! _______________________________________________________________ John Drago | Chief Architect of Software Development E-com Media Group, Inc. [www.e-commedia.com] office :: 303.790.7940 x25 email :: [EMAIL PROTECTED] E - b u s i n e s s w i t h D i m e n s i o n TM --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]