| От | Sam Mason |
|---|---|
| Тема | Re: Want to schedule tasks for the future |
| Дата | |
| Msg-id | 20100707140531.GU7584@samason.me.uk обсуждение исходный текст |
| Ответ на | Want to schedule tasks for the future (Matthew Wilson <matt@tplus1.com>) |
| Список | pgsql-general |
On Wed, Jul 07, 2010 at 01:53:25PM +0000, Matthew Wilson wrote: > create table scheduled_email ( > to_address text, > email_subject text, > email_body text, > deliver_at timestamp, > sent boolean > ); > > I know I could write an external process to poll this table and select > all rows where deliver_at < current_timestamp and sent = 'f'. > > But is there some other way inside postgresql that will do something > similar? I would want something like listen/notify, where postgres > starts an external process when any data exist. You could have a trigger tell you when the first item to be delivered changes. I'd still be tempted to keep the waiting outside the database. -- Sam http://samason.me.uk/
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера