简体   繁体   中英

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

作业打印

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM