Обсуждение: Question

Поиск
Список
Период
Сортировка

Question

От
Jorge Arangoitia Fernandez Baca
Дата:
Hi

I want to know if you can create a store procedure that run automatically after a certain time, something like a timer in java. If it exists, could you tell me how it is implemented??

Thanks

Re: Question

От
Raymond O'Donnell
Дата:
On 10/07/2009 21:56, Jorge Arangoitia Fernandez Baca wrote:

> I want to know if you can create a store procedure that run
> automatically after a certain time, something like a timer in java. If
> it exists, could you tell me how it is implemented??

Put your function in a file, and then create a cron job that runs psql
taking its input from the file:

  psql -f <your_file> <your-database>

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------

Re: Question

От
Jasen Betts
Дата:
On 2009-07-10, Jorge Arangoitia Fernandez Baca <jarangoitia@healtechnology.com.pe> wrote:
>
> --Apple-Mail-5-516743627
> Content-Type: text/plain;
>     charset=US-ASCII;
>     format=flowed;
>     delsp=yes
> Content-Transfer-Encoding: 7bit
>
> Hi
>
> I want to know if you can create a store procedure that run
> automatically after a certain time, something like a timer in java. If
> it exists, could you tell me how it is implemented??

if cron doesn't suit you there's a thing called pgAgent