I can’t run jobs on PGAgent on PostgreSQL.

I installed pgagent on Ubuntu 16.04.

I executed:

CREATE EXTENSION pgagent;
CREATE LANGUAGE plpgsql;

According to this: https://www.pgadmin.org/docs/pgadmin4/1.x/pgagent_install.htm

I run

/usr/bin/pgagent hostaddr=127.0.0.1 user=my_user password=*****

and created my job:

Jobs print

But when I try to execute , Nothing happens. There is no error, message, no. And the function is not executed.

I don’t know where to start to solve this problem

I know this is an old thread, but to help others solve this problem, here is a suggestion:

I’m not sure if pgAgent Accepting such a password means that the password can be seen through a simple ps aux command. 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

I am on Ubuntu 1 Pgagent is installed on 6.04.

I 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 job:

Jobs print

But when I try to execute, nothing happens. There are no errors, messages, no. And no Execution function.

I don’t know where to start to solve this problem

I know this is an old thread, but to help others To solve this problem, here is a suggestion:

I am not sure if pgAgent accepts such a password, which means that the password can be seen through a simple ps aux command. Instead, you need to use a 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

Leave a Comment

Your email address will not be published.