Re: Need help with db script, and daily routines

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Need help with db script, and daily routines
Дата
Msg-id 46289D89.8050107@archonet.com
обсуждение исходный текст
Ответ на Need help with db script, and daily routines  ("Peter Neu" <peter.neu@gmx.net>)
Список pgsql-general
Peter Neu wrote:
> Thanks. This script looks good. :o)
>
> How do I call it once a day with a cron job on my linux box?

Put the script in a file (e.g. expiry_script.sql) then add to your crontab:

/path/to/psql -U <username> -d <database> -f /path/to/expiry_script.sql -q

See man psql, man 5 crontab for more details.

Oh, you might want to read up on the .pgpass file too - that will give
you a safe place to store your passwords.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: "Mike Frysinger"
Дата:
Сообщение: Re: cant get pg_dump/pg_restore to behave
Следующее
От: George Weaver
Дата:
Сообщение: Re: Technical Documentation and Community Login