Feature request: pgcron

Lists: pgsql-general
From: "Martin A(dot) Brooks" <martin(at)antibodymx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Feature request: pgcron
Date: 2010-09-23 14:20:19
Message-ID: 584ff0a51339aa1efc4f483a3b1beffa.squirrel@olga.hinterlands.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi

I did not see this feature on the TODO page on the wiki. I apologise if I
have overlooked something similar.

I would like postgres to have a cron-like feature for scheduling things to
happen at particular times.

An example of this might be routinely purging data from tables, or
vacuuming specific tables.

I realise that these can easily be done via cron itself, but I feel an
internal implementation would be useful because:

* The tasks would live with the database itself and become part of the
schema and so are not "forgotten" if the database is moved across clusters
or hosts.
* Windows doesn't have cron, it uses its own system. This would provide a
consistent way of running tasks regardless of platform.

I hope this makes sense.

Regards

Martin A. Brooks
http://antibodymx.net/


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: "Martin A(dot) Brooks" <martin(at)antibodymx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Feature request: pgcron
Date: 2010-09-23 14:54:17
Message-ID: AANLkTik=PSogL=xduWXUbkx9dw=n2=WWcHC3Ed=7anF1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On Thu, Sep 23, 2010 at 16:20, Martin A. Brooks <martin(at)antibodymx(dot)net> wrote:
> Hi
>
> I did not see this feature on the TODO page on the wiki.  I apologise if I
> have overlooked something similar.
>
> I would like postgres to have a cron-like feature for scheduling things to
> happen at particular times.
>
> An example of this might be routinely purging data from tables, or
> vacuuming specific tables.
>
> I realise that these can easily be done via cron itself, but I feel an
> internal implementation would be useful because:
>
> * The tasks would live with the database itself and become part of the
> schema and so are not "forgotten" if the database is moved across clusters
> or hosts.
> * Windows doesn't have cron, it uses its own system.  This would provide a
> consistent way of running tasks regardless of platform.

You can use pgAgent for this. It ships with pgAdmin3 (and as a
separate download) and can do all this.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/