Re: Scheduling Events? - Mailing list pgsql-sql

From Guy Fraser
Subject Re: Scheduling Events?
Date
Msg-id 3E3189EA.7010105@incentre.net
Whole thread Raw
In response to Re: Scheduling Events?  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
List pgsql-sql
Hi

I would agree that cron is probably the best solution.

You could have cron perform a query that has a trigger and performs all the 
tasks you need done. As well you could create a trigger on other queries that 
would perform the other things as well, but make sure it isn't a heavily used 
query but instead a query that is run hourly or daily. As a backup for cron 
you could manualy or using "anacron" or somthing similar run the query cron 
should run on a regular basis, but you should make sure your trigger keeps an 
entry in your database letting the other queries know when the update is 
started and when it has finished. Using this check ensures you don't get 
"overlapping" updates, and can also give you a clue to how much time the 
updates are taking and possibly alert you to a "hung" update.

Guy



pgsql-sql by date:

Previous
From: Guy Fraser
Date:
Subject: Re: SQL to list databases?
Next
From: "David Durst"
Date:
Subject: Getting multiple rows in plpgsql function