Skip site navigation (1) Skip section navigation (2)

Re: HOWTO : plpgsql stored function spawn cron job that will run other stored functions

From: "Obe, Regina" <robe(dot)dnd(at)cityofboston(dot)gov>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: HOWTO : plpgsql stored function spawn cron job that will run other stored functions
Date: 2007-12-24 13:43:58
Message-ID: 53F9CF533E1AA14EA1F8C5C08ABC08D202F43507@ZDND.DND.boston.cob (view raw or flat)
Thread:
Lists: pgsql-novice
Well pgagent I think pretty much uses the tables it creates in the
PgAgent catalog of postgres.

From then it pretty much behaves like crontab.  So to programmatically
control it, I would guess all you would need to do is manually stuff
records in the pga_job, pga_jobstep, pga_schedule tables and delete them
and so forth.  I think that is all pgAdmin is really doing when you use
the job edit feature.

I don't think there is any specific documentation on it, but the tables
look pretty straight forward and there aren't that many of them.

The best way to see how to structure the jobs would be
1) Create a Job with PgAdmin III
2) Before you click okay - switch to the SQL tab and see what kind of
SQL it is generating to build the job.

Hope that helps,
Regina

-----Original Message-----
From: Robert M. Bernabe [mailto:rbernabe(at)sandmansystems(dot)com] 
Sent: Friday, December 21, 2007 6:42 PM
To: Obe, Regina; pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] HOWTO : plpgsql stored function spawn cron job
that will run other stored functions

Again Thanks. Would you know of any documentation that details how to 
programmatically control pgagent? Also something that details the tables
it 
uses plus maybe scripting and interface? Thanks.


----- Original Message ----- 
From: "Obe, Regina" <robe(dot)dnd(at)cityofboston(dot)gov>
To: "Robert M. Bernabe" <rbernabe(at)sandmansystems(dot)com>; 
<pgsql-novice(at)postgresql(dot)org>
Sent: Friday, December 21, 2007 8:07 PM
Subject: RE: [NOVICE] HOWTO : plpgsql stored function spawn cron job
that 
will run other stored functions


Not quite clear what you are asking for.

Does PgAgent fit your needs http://www.pgadmin.org/docs/1.8/pgagent.html
?

If you needed jobs dynamically created for some reason I think all you
would need to do is stuff the appropriate records in the PgAgent related
tables.  Although I'm not quite sure if you are looking for a simple
scheduling agent which is what PgAgent is or for something more advanced
or if you have already ruled it out for some other reason.

Hope that helps,
Regina


I'm protected by SpamBrave
http://www.spambrave.com/

-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.


In response to

pgsql-novice by date

Next:From: G. J. WalshDate: 2007-12-27 00:41:26
Subject: phppgadmin for postgresql 8.3 beta 4
Previous:From: Obe, ReginaDate: 2007-12-24 12:56:36
Subject: Re: pgAgent on workstation/client

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group