From: | "Owen Jacobson" <ojacobson(at)osl(dot)com> |
---|---|
To: | "Daniel Caune" <daniel(dot)caune(at)ubisoft(dot)com>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Does PostgreSQL support job? |
Date: | 2006-02-01 22:59:33 |
Message-ID: | 144D12D7DD4EC04F99241498BB4EEDCC1FAB6F@nelson.osl.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2006-02-01 23:00:18 | Re: Does PostgreSQL support job? |
Previous Message | Daniel Caune | 2006-02-01 22:59:15 | Re: Does PostgreSQL support job? |