Re: Scheduled jobs - Mailing list pgsql-hackers

From Zlatko Michailov
Subject Re: Scheduled jobs
Date
Msg-id 20030513141852.42522.qmail@web11206.mail.yahoo.com
Whole thread Raw
In response to Re: Scheduled jobs  (Christopher Browne <cbbrowne@cbbrowne.com>)
Responses Re: Scheduled jobs  (Andrew Sullivan <andrew@libertyrms.info>)
Re: Scheduled jobs  (Kaare Rasmussen <kar@kakidata.dk>)
List pgsql-hackers
Yes. We need a system table to store scheduled jobs and a single external daemon to fire them up.

The example I have in mind is maintaining active sessions where my app maintains its own user
accounts. When a user logs in, a session row is created in a an app table. Every time a new
request comes through that session, a last_used timestamp is updated. At the same time there must
be a job checking that same table every minute for rows where the last_used timestamp is over 20
minutes old and remove such rows. Since the account registrations are inside the database, it
appeals to me that session maintenance should also be there.

Please think about it again. I can provide a table and SQL command (or stored proc) proposal.

Thanks,
Zlatko


--- Christopher Browne <cbbrowne@cbbrowne.com> wrote:
> Quoth nandrews@investsystems.co.uk ("Nigel J. Andrews"):
> > I believe this has arisen several times and each time there's been
> > no enthusiasm to stick cron into the core which I think is a
> > reasonable stance.
> 
> I think it _would_ be kind of neat to set up some tables to contain
> what's in the postgres user's crontab, and have a pair of stored
> procedures to move data in and out.  If you had some Truly Appalling
> number of cron jobs, manipulating them in a database could well be a
> great way to do it.
> 
> That is, of course, quite separate from having cron in the core.  And
> having a _good_ set of semantics for the push/pull is a nontrivial
> matter...
> -- 
> If this was helpful, <http://svcs.affero.net/rm.php?r=cbbrowne> rate me
> http://cbbrowne.com/info/nonrdbms.html
> As Will Rogers would have said, "There is no such thing as a free
> variable."  -- Alan Perlis
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: LIKE indexing proposal
Next
From: Andrew Sullivan
Date:
Subject: Re: Scheduled jobs