Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DE0CA476653 for ; Fri, 24 Jan 2003 14:24:53 -0500 (EST) Received: from bach.ccinet.ab.ca (bach.ccinet.ab.ca [198.161.96.1]) by postgresql.org (Postfix) with ESMTP id 906C84770DC for ; Fri, 24 Jan 2003 13:46:02 -0500 (EST) Received: from incentre.net (squid.incentre.net [206.75.213.195]) by bach.ccinet.ab.ca (8.12.6/8.12.6) with ESMTP id h0OIoi7f020471 for ; Fri, 24 Jan 2003 11:50:45 -0700 (MST) (envelope-from guy@incentre.net) Message-ID: <3E3189EA.7010105@incentre.net> Date: Fri, 24 Jan 2003 11:46:02 -0700 From: Guy Fraser Organization: J I Reasearch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Scheduling Events? References: <13296.1043422336@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/401 X-Sequence-Number: 11266 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