Re: [Pgsql-ayuda] Como ejecutar funcion desde cron

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Edwin Quijada <listas_quijada(at)hotmail(dot)com>
Cc: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [Pgsql-ayuda] Como ejecutar funcion desde cron
Date: 2003-09-29 20:11:15
Message-ID: 20030929201115.GI23193@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Mon, Sep 29, 2003 at 07:48:27PM +0000, Edwin Quijada wrote:
> Deseo ejecutar un metodo hecho en plpgsql como una tarea recurrente cada
> 12horas. Se que esto tengo q hacerlo usando CRON pero no se que comando
> usar para q se ejecute
> Sera algo como esto
>
> psql database -u postgres -p 'pass' funcion_a_ejecutar

Puedes poner la password en ~/.pgpass para no tener que ponerla en el
crontab (sólo Postgres 7.3).

En todo caso algo como

psql db -u user -c "select funcion()"

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Before you were born your parents weren't as boring as they are now. They
got that way paying your bills, cleaning up your room and listening to you
tell them how idealistic you are." -- Charles J. Sykes' advice to teenagers

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message sandrigo lezcano 2003-09-29 20:37:42 Re: [Pgsql-ayuda] store procedure
Previous Message Alvaro Herrera 2003-09-29 20:09:20 Re: [Pgsql-ayuda] Del backup y tiempo de duracion