Thread: How to create recurrence schedule event?
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
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
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
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