4

I installed pgagent on Ubuntu 16.04.

I executed:

CREATE EXTENSION pgagent;
CREATE LANGUAGE plpgsql;

According 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 jobs:

Jobs print

But, when I try to execute, nothing happens. No error, messages, nothing. And functions are not executed.

I do not know where to start solving this

1 Answers1

1

I know it's an old thread, but for the sake of helping other people having this issue, here is a suggestion:

I'm not sure if pgAgent accepts passwords like this, which would mean the password would be visible via 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
Jim Jones
  • 18,404
  • 3
  • 35
  • 44