pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleus Mantzios <achill@matrix.gatewaynet.com>
To: Alexis Paul Bertolini <bertolini@computer.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Job queue, how would you implement this?
Date: Tue, 21 Mar 2006 16:23:18 +0200 (EET)
Message-ID: <Pine.LNX.4.44.0603211618220.26516-100000@matrix.gatewaynet.com> (raw)
In-Reply-To: <441FF966.2020202@computer.org>

O Alexis Paul Bertolini Ýãñáøå óôéò Mar 21, 2006 :

> Dear all,
> 
> I have implemented a job queue table where various apps can add jobs to 
> the queue and other daemons then execute them. A basic producer-consumer 
> pattern. Each tuple in the queue has the basic info such as job to be 
> done, when it should be done, who should do it, a flag marking it completed.
> 
> The consumer thus selects from the queue all jobs who scheduled in the 
> past (<=CURRENT_TIMESTAMP) and are not flagged. Then flags them upon 
> succesfull completion.

The consumer runs from the command line? (i.e. user-action driven?)

> 
> I now wish to implement repeating scheduled jobs, like "every 5 
> minutes", "every morning at 7.00am" and so on. How could I do this?

I think the traditional UNIX "at" framework could be a good
model (or replacement) of the simpler case,
whereas the traditional UNIX "cron" framework could be a good
model (or replacement) of the latter case.
Your requirements photographically point to the above systems.
Are you running on a UNIX machine?

> 
> Any suggestions are welcome and if necessary I can provide you with more 
> info.
> 
> Thanks
> 
> Alex.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq
> 

-- 
-Achilleus




view thread (2+ messages)

Message-ID: <Pine.LNX.4.44.0603211618220.26516-100000@matrix.gatewaynet.com>
Permalink:  ../Pine.LNX.4.44.0603211618220.26516-100000@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.44.0603211618220.26516-100000@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: achill@matrix.gatewaynet.com, bertolini@computer.org
  Subject: Re: Job queue, how would you implement this?
  In-Reply-To: <Pine.LNX.4.44.0603211618220.26516-100000@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox