I can't run jobs in PgAgent on Postgresql
I have installed pgagent on Ubuntu 16.04.
I have executed:
CREATE EXTENSION pgagent;
CREATE LANGUAGE plpgsql;
According to this: https://www.pgadmin.org/docs/pgadmin4/1.x/pgagent_install.htm
I ran
/usr/bin/pgagent hostaddr=127.0.0.1 user=my_user password=*****
And created my assignments:
But when I try to execute, nothing happens. No errors, no messages, nothing. And the functions are not performed.
I don't know where to start this solution
+3
source to share
1 answer
I know this is an old thread, but for the sake of helping other people having this problem, here's a suggestion:
I'm not sure if pgAgent accepts passwords like this, which means the password will be displayed with a simple command ps aux
. Instead, you need to use the pgpass file:
$ sudo su - postgres
$ cd ~
$ nano .pgpass
# Insert the following text and save the document:
localhost:5432:*:postgres:[postgres_password]
$ chmod 0600 .pgpass
$ pgagent hostaddr=localhost dbname=postgres user=postgres
0
source to share