Re: "trigger"ing a procedure every X minutes - Mailing list pgsql-general

From Fran Fabrizio
Subject Re: "trigger"ing a procedure every X minutes
Date
Msg-id 3B1E6EDF.491BFA3F@exchange.webmd.net
Whole thread Raw
In response to "trigger"ing a procedure every X minutes  (Fran Fabrizio <ffabrizio@Exchange.WebMD.net>)
Responses Re: "trigger"ing a procedure every X minutes  (<Herbert.Liechti@thinx.ch>)
List pgsql-general
Some thoughts are:

1.  It would be portable with the database.  I don't have to go setting up
crons on the new machine if I move the db.
2.  The cron usually involves writing a shell/perl/whatever script to call
the psql client and pass in SQL queries via STDIN or file redirect just to
invoke the desired procedure.  An internal mechanism would bypass all of
that.
3.  All of the code that maintains the database could be in one place
internal to the db.

It's certainly not a big deal to use the cron, I just thought maybe someone
had experimented with an internal mechanism.  I'd like to try it someday,
when I know a lot more about Pg.  My current project has an ever-growing
number of cron jobs (up to 6 now) and was just thinking about various ways to
tidy it up.

Thanks for the info,
Fran

> Fran Fabrizio <ffabrizio@Exchange.WebMD.net> writes:
> > Is the preferred method of calling a procedure every X minutes to have a
> > cronjob installed external to the database,
>
> Yes.
>
> I see no need for us to replicate the functionality of cron ...
>
>                         regards, tom lane


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: "trigger"ing a procedure every X minutes
Next
From: Alvaro Herrera
Date:
Subject: Re: PostgreSQL Replication Server?