X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0AF289DCC30 for ; Wed, 1 Feb 2006 18:59:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 54325-09 for ; Wed, 1 Feb 2006 18:59:39 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 060FB9DCE03 for ; Wed, 1 Feb 2006 18:59:35 -0400 (AST) Received: from nelson.osl.com (216-21-133-120.ip.van.radiant.net [216.21.133.120]) by svr4.postgresql.org (Postfix) with ESMTP id 0FB025AF84E for ; Wed, 1 Feb 2006 22:59:37 +0000 (GMT) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Subject: Re: Does PostgreSQL support job? Date: Wed, 1 Feb 2006 14:59:33 -0800 Message-ID: <144D12D7DD4EC04F99241498BB4EEDCC1FAB6F@nelson.osl.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Does PostgreSQL support job? Thread-Index: AcYngl8QlpNEqTvFQnKDEuks2DB0ywAAF6VA From: "Owen Jacobson" To: "Daniel Caune" , X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.09 required=5 tests=[AWL=0.090] X-Spam-Score: 0.09 X-Spam-Level: X-Archive-Number: 200602/11 X-Sequence-Number: 24021 Daniel Caune wrote: > Hi, > =20 > I try to find in the documentation whether PostgreSQL supports job,=20 > but I miserably failed. Does PostgreSQL support job? If not, what > is the mechanism mostly adopted by PostgreSQL administrators for=20 > 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