Обсуждение: How to create recurrence schedule event?

Поиск
Список
Период
Сортировка

How to create recurrence schedule event?

От
Quang Thoi
Дата:

Hi,

 

I am trying to port sybase codes to posgresql. I have looked into the postgresql documentation

but couldn't find good information on how to  create an equivalent recurrence event

which similar to the sybase codes below.

 

Can some one please help?

 

sybase codes:

 

create event PURGE_ORDER schedule

start time '00:00:00' every 30 minutes

       on ( 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday','Saturday', 'Sunday' )

 

handler begin

 

     declare @value           varchar(128);

     call cleanup_order();

end;

 

Thanks,

QT

Re: How to create recurrence schedule event?

От
Raymond O'Donnell
Дата:
On 23/09/2013 19:53, Quang Thoi wrote:
> Hi,
>
>
>
> I am trying to port sybase codes to posgresql. I have looked into the
> postgresql documentation
>
> but couldn't find good information on how to  create an equivalent
> recurrence event
>
> which similar to the sybase codes below.

There isn't a built-in scheduler in PostgreSQL - the usual advice is to
use cron to execute a query via the psql client, or to install and use
pgAgent.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie


Re: How to create recurrence schedule event?

От
Michael Paquier
Дата:
On Tue, Sep 24, 2013 at 3:55 AM, Raymond O'Donnell <rod@iol.ie> wrote:
> There isn't a built-in scheduler in PostgreSQL - the usual advice is to
> use cron to execute a query via the psql client, or to install and use
> pgAgent.
Or with a 9.3 server to use a background worker that could do the job
for you as a cron would.
--
Michael


Re: How to create recurrence schedule event?

От
hxreno1
Дата:
pgAgent is a job scheduler for PostgreSQL which may be managed using pgAdmin. Prior to pgAdmin v1.9, pgAgent shipped as part of pgAdmin. From pgAdmin v1.9 onwards, pgAgent is shipped as a separate application.

On 09/24/2013 02:53 AM, Quang Thoi wrote:

Hi,

 

I am trying to port sybase codes to posgresql. I have looked into the postgresql documentation

but couldn't find good information on how to  create an equivalent recurrence event

which similar to the sybase codes below.

 

Can some one please help?

 

sybase codes:

 

create event PURGE_ORDER schedule

start time '00:00:00' every 30 minutes

       on ( 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday','Saturday', 'Sunday' )

 

handler begin

 

     declare @value           varchar(128);

     call cleanup_order();

end;

 

Thanks,

QT