Re: elegant and effective way for running jobs inside a database

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Christopher Browne <cbbrowne(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Josh Berkus <josh(at)agliodbs(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elegant and effective way for running jobs inside a database
Date: 2012-03-06 23:31:16
Message-ID: 4F569E44.6090601@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/06/2012 06:12 PM, Christopher Browne wrote:
> On Tue, Mar 6, 2012 at 5:01 PM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
>> Why do we need a ticker? Just fetch the time of the task closest in the
>> future, and sleep till that time or a notify arrives (meaning schedule
>> change).
> Keep in mind that cron functionality also includes "batch", which
> means that the process needs to have the ability to be woken up by the
> need to handle some pressing engagement that comes in suddenly.
>
> For some events to be initiated by a NOTIFY received by a LISTENing
> batch processor would be pretty slick...

We don't slavishly need to reproduce every piece of cron. In any case,
on my Linux machine at least, batch is part of the "at" package, not the
"cron" package. If you want anything at all done, then I'd suggest
starting with a simple scheduler. Just about he quickest way to get
something rejected in Postgres is to start with something overly complex
and baroque.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Farina 2012-03-06 23:49:03 Re: elegant and effective way for running jobs inside a database
Previous Message Thom Brown 2012-03-06 23:25:55 Re: Command Triggers, patch v11