Re: "trigger"ing a procedure every X minutes

From: Fran Fabrizio <ffabrizio(at)Exchange(dot)WebMD(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: "trigger"ing a procedure every X minutes
Date: 2001-06-06 17:56:47
Message-ID: 3B1E6EDF.491BFA3F@exchange.webmd.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)Exchange(dot)WebMD(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2001-06-06 18:13:47 Re: PostgreSQL Replication Server?
Previous Message Stephan Szabo 2001-06-06 17:55:43 Re: [SQL] maximum number of rows in table - what about oid limits?