pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexis Paul Bertolini <bertolini@computer.org>
To: pgsql-sql@postgresql.org
Subject: Job queue, how would you implement this?
Date: Tue, 21 Mar 2006 14:02:30 +0100
Message-ID: <441FF966.2020202@computer.org> (raw)

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.

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?

Any suggestions are welcome and if necessary I can provide you with more 
info.

Thanks

Alex.



view thread (2+ messages)  latest in thread

Message-ID: <441FF966.2020202@computer.org>
Permalink:  ../441FF966.2020202@computer.org/
Also on:    postgresql.org/message-id/441FF966.2020202@computer.org

 · 

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: bertolini@computer.org
  Subject: Re: Job queue, how would you implement this?
  In-Reply-To: <441FF966.2020202@computer.org>

* 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