pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Owen Jacobson <ojacobson@osl.com>
To: Daniel Caune <daniel.caune@ubisoft.com>
To: pgsql-sql@postgresql.org
Subject: Re: Does PostgreSQL support job?
Date: Wed, 1 Feb 2006 14:59:33 -0800
Message-ID: <144D12D7DD4EC04F99241498BB4EEDCC1FAB6F@nelson.osl.com> (raw)

Daniel Caune wrote:
> Hi,
>  
> I try to find in the documentation whether PostgreSQL supports job, 
> but I miserably failed.  Does PostgreSQL support job?  If not, what
> is the mechanism mostly adopted by PostgreSQL administrators for 
> running jobs against PostgreSQL?  I was thinking about using
> cron/plsql/sql-scripts on Linux.

The answer really depends on what you mean by "jobs".  If you have a database task that can be expressed as a series of commands with no interaction involved, you can just put those commands in a file (your-job-name.sql) and run it using psql and cron:

# replace leading stars with cron time settings
* * * * *     psql your-database -i your-job-name.sql

If you need something more complex, either a function which is executed from a script or a full-blown client program may be required.  IME that's fairly rare.

-Owen



view thread (16+ messages)  latest in thread

Message-ID: <144D12D7DD4EC04F99241498BB4EEDCC1FAB6F@nelson.osl.com>
Permalink:  ../144D12D7DD4EC04F99241498BB4EEDCC1FAB6F@nelson.osl.com/
Also on:    postgresql.org/message-id/144D12D7DD4EC04F99241498BB4EEDCC1FAB6F@nelson.osl.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ojacobson@osl.com, daniel.caune@ubisoft.com
  Subject: Re: Does PostgreSQL support job?
  In-Reply-To: <144D12D7DD4EC04F99241498BB4EEDCC1FAB6F@nelson.osl.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox