Re: HOWTO : plpgsql stored function spawn cron job that will run other stored functions

Поиск
Список
Период
Сортировка
От John DeSoi
Тема Re: HOWTO : plpgsql stored function spawn cron job that will run other stored functions
Дата
Msg-id BE57A1F4-41FE-4683-B419-8229A4D621FB@pgedit.com
обсуждение исходный текст
Ответ на Re: HOWTO : plpgsql stored function spawn cron job that will run other stored functions  ("Robert M. Bernabe" <rbernabe@sandmansystems.com>)
Список pgsql-novice
On Dec 21, 2007, at 7:43 AM, Robert M. Bernabe wrote:

> Thanks for the reply. PGAgent is one option I've found but I was
> hoping somebody can suggest another way to do this that would just
> use plpgsql and maybe cron. Another method perhaps that is not
> dependent  PGAgent...


You can't do this in plpgsql alone. There is no built-in facility to
make something run at some interval. If you use cron, all you need to
do is have it call your function from a shell script. Something like:

psql -d database -U user -c "select my_store_function()"




John DeSoi, Ph.D.




В списке pgsql-novice по дате отправления:

Предыдущее
От: "Robert M. Bernabe"
Дата:
Сообщение: Re: HOWTO : plpgsql stored function spawn cron job that will run other stored functions
Следующее
От: "Robert M. Bernabe"
Дата:
Сообщение: Re: HOWTO : plpgsql stored function spawn cron job that will run other stored functions