Re: scheduling stored procedure

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Alain Roger" <raf(dot)news(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: scheduling stored procedure
Date: 2008-03-23 16:30:21
Message-ID: 162867790803230930y2625b635l34fc848eb56cf3fe@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 23/03/2008, Alain Roger <raf(dot)news(at)gmail(dot)com> wrote:
> Hi,
>
> I have a temporary table in which i store all emails of users who want to
> receive a newsletter.
> to avoid spamming and to limit the size of this table, i would like to
> delete all requests (records) which are older than 72 hours.
>
> i was thinking to execute each hour a stored procedure which will check the
> time and date (of now) if it is greater than "registration request time"
> stored in this temporary table.
> if it is greater, so record will be deleted.
>
> does postgresql have such timer (something like "cron" under unix/linux) ?
>

no, but you can try pgAgent
http://www.pgadmin.org/docs/1.4/pgagent.html

> thanks a lot,
>
> --
> Alain
> ------------------------------------
> Windows XP SP2
> PostgreSQL 8.2.4 / MS SQL server 2005
> Apache 2.2.4
> PHP 5.2.4
> C# 2005-2008

In response to

Browse pgsql-general by date

  From Date Subject
Next Message paul rivers 2008-03-23 16:47:36 Re: table size and storage location
Previous Message Ben 2008-03-23 16:18:59 Re: scheduling stored procedure