Re: How to run a posgresql function/procedure thro crontab

Поиск
Список
Период
Сортировка
От Koen Martens
Тема Re: How to run a posgresql function/procedure thro crontab
Дата
Msg-id 43B14E49.3090003@metro.cx
обсуждение исходный текст
Ответ на How to run a posgresql function/procedure thro crontab in Linux ES 4.0  ("Murugan G" <murugan.g@renaissance-it.com>)
Список pgsql-admin
Murugan G wrote:

> Hello,
> If anybody tried, please let me know how to run a postgresQL
> function/procedure thro crontab in Linux ES 4.0
>
>
$ psql --help

This is psql 8.1.0, the PostgreSQL interactive terminal.

......
  -c COMMAND      run only single command (SQL or internal) and exit
......


So just put a proper invocation of psql in cron, eg something like:

0 * * * * /path/to/binary/psql -U foo -h yourhost.com -c "select bar()"
dbname 1> /dev/null

Gr,

Koen

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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: Procedure in PostgresQL
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: sending mail from Postgres