Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 411D447709C for ; Fri, 24 Jan 2003 11:15:50 -0500 (EST) Received: from mta5.snet.net (mta5.snet.net [204.60.203.77]) by postgresql.org (Postfix) with ESMTP id 86A2D477198 for ; Fri, 24 Jan 2003 10:55:16 -0500 (EST) Received: from pop.snet.net (pop.snet.net [204.60.203.72]) by mta5.snet.net (8.12.3/8.12.3/SNET-mx-1.2/D-1.1.1.1/O-1.1.1.1) with ESMTP id h0OFpllh003980; Fri, 24 Jan 2003 10:51:47 -0500 (EST) X-Originating-IP: [64.252.95.167] X-SBCIS-MTA: [pop.snet.net] Received: from monet (167.95.252.64.snet.net [64.252.95.167]) by pop.snet.net (8.12.3/8.12.3/SNET-pop-1.2/D-1.1.1.1/O-1.1.1.1) with SMTP id h0OFt8gM000554; Fri, 24 Jan 2003 10:55:09 -0500 (EST) Message-ID: <009801c2c3c1$07275d80$5301a8c0@monet> From: "Wei Weng" To: "Achilleus Mantzios" Cc: References: <13296.1043422336@sss.pgh.pa.us> Subject: Re: Scheduling Events? Date: Fri, 24 Jan 2003 10:55:27 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/399 X-Sequence-Number: 11264 Or if you are so paranoid about the stability of crond, you can probably do a check to see whether crond is up when you update the database. If crond is up then update else mail root the error reject the update end This is going to affect the performance dramatically though. ----- Original Message ----- From: "Tom Lane" To: "Achilleus Mantzios" Cc: "David Durst" ; Sent: Friday, January 24, 2003 10:32 AM Subject: Re: [SQL] Scheduling Events? > Achilleus Mantzios writes: > > On Fri, 24 Jan 2003, David Durst wrote: > >> Here is the basic problem w/ using CRON in an accounting situation. > >> > >> 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..) > > > I you cannot depend on your system to run crond > > then you should not depend on it to run postgresql either. > > Indeed. Cron is one of the oldest and most basic Unix daemons. > I find it really, really, really hard to believe that any substitute > code that anyone might come up with is going to be more reliable than > cron. > > If it makes you feel better, you could institute some cross-checking. > For example, have the cron-launched task update a timestamp in some > database table whenever it finishes. Then make your user applications > check that timestamp when they start up (or every so often) and complain > if it's not within the range (now - expected cron frequency, now). > That doesn't fix the problem, but at least makes some humans aware of it. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html >