Is there a way to have a Perl function called at some point in time,
like I think AOLserver can do in Tcl (but I don't want to do either
AOLserver or Tcl!)?

I thought about checking the time in a PerlCleanupHandler, but this
would be in each Apache subprocess and I want this to get called only
once. The precision is not so important (unless we're talking hours
later or something like that!).

I thought of having a table of jobs in my PostgreSQL database and
(carefully avoiding race conditions with transactions/locking) checking
if the next job was due to be run, but that doesn't "smell" very good. I
could run the query only on the condition that a minute has passed since
the last time we did it, but still, I'm not sure.

I would like to know if anyone already did that or have any idea on how
to do that more properly?

-- 
"The use of COBOL cripples the mind; its teaching should, therefore, be
regarded as a criminal offence." -- Edsger W. Dijkstra

Reply via email to