pgAgent - adding parameters to runs

From: Bastiaan Olij <bastiaan(at)basenlily(dot)me>
To: pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: pgAgent - adding parameters to runs
Date: 2013-12-09 21:25:24
Message-ID: 52A63544.2040604@basenlily.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi all,

I'm just throwing this out there to see if any one has had ideas about
doing this or can suggest a workaround. It may be the final push I need
to download the source and try my hand at extending pgAgent myself :)

The situation we have is that we have multiple databases on our server
and that we have the need to run backups for these databases
individually. Right now we solve this by having a job for each database
configured in pgAgent so we can run the backup script for that specific
database.

Ideally I would like to have a single job configured in pgAgent but when
I tell the job to run, give it one or more parameters that can be
inserted into the script text of the step(s) of the job.
To make this work properly however storing a single parameter and
runtime won't suffice as it is possible that I may schedule runs for
several databases one after another each with a different setting for
the parameter(s).

The idea I had for that last issue is to add a queue table to pgAgent
where you can queue running a job outside of the normal "next schedule"
logic that currently exists.

An alternative I've been wondering about but have no idea whether it is
feasible is to have the pgAgent jobs stored in each individual database,
but it would require pgAgent to log onto each database to see if there
is a job to run in that database.

Any ideas would be welcomed:)

Cheers,

Bastiaan Olij

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Steve Erickson 2013-12-10 05:38:13 Lost database
Previous Message Vinícius Fontes 2013-12-09 19:12:17 Re: Keyboard Layout US International - PC