Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 1A7B59FB2AF for ; Thu, 2 Nov 2006 15:24:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 48648-05 for ; Thu, 2 Nov 2006 19:24:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx1.linuxlouis.net (mx1.linuxlouis.net [70.88.107.105]) by postgresql.org (Postfix) with ESMTP id 45F0F9FB2A7 for ; Thu, 2 Nov 2006 15:24:31 -0400 (AST) Received: from [192.168.0.3] (wap.linuxlouis.net [70.88.107.106]) (authenticated bits=0) by mx1.linuxlouis.net (8.13.4/8.13.4) with ESMTP id kA2JTWHd030285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Nov 2006 14:29:42 -0500 Message-ID: <454A45E4.8090409@linuxlouis.net> Date: Thu, 02 Nov 2006 14:24:20 -0500 From: louis gonzales User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andreas Kretschmer CC: pgsql-general@postgresql.org Subject: Re: Is there anyway to... References: <20061102171624.GE21312@localhost> <454A357E.6010409@linuxlouis.net> <454A394C.7020102@zijn-digital.com> <454A3EB6.8080806@linuxlouis.net> <20061102190906.GA23069@KanotixBox> In-Reply-To: <20061102190906.GA23069@KanotixBox> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/113 X-Sequence-Number: 103209 To all who replied, first, thank you! Second, I simply said 'dirty' never said dislike or anything like that. I've used and use cron for different OS related operations and have for years. I LOVE cron itself. What I mean with 'dirty' is that I'm trying to take away as much as possible from external influences to the database action I want to happen. Fine so let's say when the instructor creates the user profile, this can trigger the creation of a sequence, say, but IF the instructor doesn't visit that student's profile for a month, I want something that, independent of any other action, will be either incrementing or decrementing that sequence. So when the instructor does go back to visit the student profile it will only show/flag the status if the time has elapsed. Is there like a sleep() function that postgresql has? That could be part of the plan. So sleep(24hours) - pseudo code - wake up and increment something initiate trigger to see if a requirement has been met - say 10day or 30day or 1year has elapsed - if so, set a flag attribute to the student profile. During that 30 days, the instructor won't care what's going on behind the scenes, they just care when the time has elapsed, that they will get a flag, to say, "hey buddy, over here, this student hasn't fulfilled the agreement." Based on what everyone is saying, there is no such internal mechanism function/trigger or otherwise, that can do independent actions. Andreas Kretschmer wrote: >louis gonzales schrieb: > > > >>Hey Brian, >>Yeah I had considered this, using cron, I just feel like that is too dirty. >> >> > >Why? > > > > >>Actually I didn't see Andreas' post, can someone forward that? >> >> > >Sorry, i posted to the list, and i can see my mail. > > > > >>I'm running this application on Solaris 9. Ultimately what I want to know >>is, is there something that is internal to postgresql that can be used that >>doesn't need external action, to make it do some task? >> >> > >Take a look at http://pgfoundry.org/projects/pgjob/ > > > > >>Am I making any sense with how I'm asking this? I could of course have >>cron do a scheduled task of checking/incrementing/decrementing and define >>triggers to occur when one of the cron delivered actions sets the >>appropriate trigger off, but are there other methods that are standard in >>the industry or are we stuck with this type of external influence? >> >> > >I'm using PG on Linux-systems and use CRON for any tasks, without any >problems. I can't understand your dislike... > > >Andreas > > -- Email: louis.gonzales@linuxlouis.net WebSite: http://www.linuxlouis.net "Open the pod bay doors HAL!" -2001: A Space Odyssey "Good morning starshine, the Earth says hello." -Willy Wonka