X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 6FC9E9FB267 for ; Thu, 24 Aug 2006 05:53:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 82090-01 for ; Thu, 24 Aug 2006 08:53:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 725B69FB25A for ; Thu, 24 Aug 2006 05:53:15 -0300 (ADT) Received: (qmail invoked by alias); 24 Aug 2006 08:53:14 -0000 Received: from ktbl.heagmedianet.de (EHLO PCMELZER) [213.188.107.46] by mail.gmx.net (mp031) with SMTP; 24 Aug 2006 10:53:14 +0200 X-Authenticated: #17979613 From: "Peter Neu" To: Subject: WG: HowTo: Scheduled User Management? Date: Thu, 24 Aug 2006 10:52:49 +0200 Message-ID: <002201c6c75a$ad7d1e40$bcc8a8c0@PCMELZER> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Thread-Index: AcbGfh4ch149X7sMRHervPAqkhPAzgAxzYkgAAVRGBA= X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.951 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: *** X-Archive-Number: 200608/121 X-Sequence-Number: 15648 Hello, I have a small app which manages users in a postgresql db. I use 7.4.2. Yesterday I got this requirement that user accounts should be valid only for a given period. When I create a new user I will have to have two timestamps one with now() and one with now()+6 months. Now the tricky part: The system should check once a day if an account is still valid and if not it should set the account to inactive and notify somebody by mail. How is this done the best way? I heard some stuff about doing this with a crone job, is this necessary (db runs on linux)? My app runs in a tomcat server so it is available all the time. Is this a job for quartz API or is there an easier way? What would you guys suggest? Cheers, Pete