pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Job queue, how would you implement this? 2+ messages / 2 participants [nested] [flat]
* Job queue, how would you implement this? @ 2006-03-21 13:02 Alexis Paul Bertolini <bertolini@computer.org> 2006-03-21 14:23 ` Re: Job queue, how would you implement this? Achilleus Mantzios <achill@matrix.gatewaynet.com> 0 siblings, 1 reply; 2+ messages in thread From: Alexis Paul Bertolini @ 2006-03-21 13:02 UTC (permalink / raw) To: pgsql-sql 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. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Job queue, how would you implement this? 2006-03-21 13:02 Job queue, how would you implement this? Alexis Paul Bertolini <bertolini@computer.org> @ 2006-03-21 14:23 ` Achilleus Mantzios <achill@matrix.gatewaynet.com> 0 siblings, 0 replies; 2+ messages in thread From: Achilleus Mantzios @ 2006-03-21 14:23 UTC (permalink / raw) To: Alexis Paul Bertolini <bertolini@computer.org>; +Cc: pgsql-sql 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-03-21 14:23 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2006-03-21 13:02 Job queue, how would you implement this? Alexis Paul Bertolini <bertolini@computer.org> 2006-03-21 14:23 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
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