I wrote an OpenACS module, which worked on Oracle and pg called cronjob.
Once per minute it queried a table, ran the sql (if any) and then ran the tcl 
script (if any), and sent an email report (if there was an email address).

Btw, getting a database handle doesn't require opening a connection, database 
connections are already established. Getting the handle is fast, releasing 
them should be automatic. 

But if the task is really a database task, why not run it inside the database, 
but I'm not sure how schedule database tasks in pg. Oracle 10g I believe has 
a nice facility for scheduling tasks, and obviously triggers can fire so you 
don't have to poll anything.

tom jackson

On Tuesday 12 September 2006 08:41, Titi Ala'ilima wrote:
> Hi all,
>
> What I'd love would be a way to have an nsd thread listen for a certain
> db event and fire Tcl as a result.  Anyone know how to accomplish this
> other than polling?  I'd hate to have to grab a handle, query, and then
> release a handle.  In a pinch I know I could have the db make an HTTP
> request.  But ideally there would be a persistent connection open and
> the db (in this case Oracle, but I'd like to figure out a way that would
> work with postgres, too) would report when Tcl needs to be fired.  Seems
> like nsproxy may be useful for this.
>
> -Titi
>
>
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to
> <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the
> email message. You can leave the Subject: field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to