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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux