Re: Scheduled jobs

From: Zlatko Michailov <zmichailov(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Scheduled jobs
Date: 2003-05-13 14:18:52
Message-ID: 20030513141852.42522.qmail@web11206.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)cbbrowne(dot)com> wrote:
> Quoth nandrews(at)investsystems(dot)co(dot)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(at)postgresql(dot)org)

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Sullivan 2003-05-13 14:41:34 Re: Scheduled jobs
Previous Message Tom Lane 2003-05-13 14:07:02 Re: LIKE indexing proposal