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 documentationbut couldn't find good information on how to create an equivalent
recurrence eventwhich 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
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
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
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
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.
Show quoted text
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 documentationbut couldn't find good information on how to create an equivalent
recurrence eventwhich 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