Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3F56A475D87 for ; Fri, 24 Jan 2003 08:17:07 -0500 (EST) Received: from wolff.to (wolff.to [66.93.249.74]) by postgresql.org (Postfix) with SMTP id 64F54475A3F for ; Fri, 24 Jan 2003 08:17:06 -0500 (EST) Received: (qmail 24260 invoked by uid 500); 24 Jan 2003 13:29:44 -0000 Date: Fri, 24 Jan 2003 07:29:44 -0600 From: Bruno Wolff III To: David Durst Cc: pgsql-sql@postgresql.org Subject: Re: Scheduling Events? Message-ID: <20030124132944.GA24169@wolff.to> Mail-Followup-To: David Durst , pgsql-sql@postgresql.org References: <39409.216.86.192.34.1043367412.squirrel@www.la-rubber.com> <41705.216.86.192.34.1043397938.squirrel@www.la-rubber.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41705.216.86.192.34.1043397938.squirrel@www.la-rubber.com> User-Agent: Mutt/1.3.25i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/395 X-Sequence-Number: 11260 On Fri, Jan 24, 2003 at 00:45:38 -0800, David Durst wrote: > > I can't be sure that cron will always be up when the DB is up, > so lets say crond goes down for some random reason (User, System error, > Etc..) One option would be to run the cron job fairly often and have it check if there are any tasks that need to be done. If there are it does them in a transaction which also makes some update that indicates that the task has been done. The other option would be that the process(es) that use the monthly updates, check to see that they have been done as part of their transaction and if not do the update first before proceeding.