0

I have installed pgagent on ubuntu with the following service config:

[Unit]
Description=pgAgent Job Scheduler

[Service]
User=postgres
ExecStart=/usr/bin/pgagent host=localhost dbname=mydatabase user=myuser password=mypassword

[Install]
WantedBy=multi-user.target

whenever I start and check the status of pgagent I always get the status (inactive: dead). And on my pgagent node properties the last run is blank. I tried to check my pgagent service config many times but the job is still not running.

sudo systemctl status pgagent.service
● pgagent.service - pgAgent Job Scheduler
     Loaded: loaded (/etc/systemd/system/pgagent.service; enabled; vendor prese>
     Active: inactive (dead) since Tue 2023-03-14 11:52:26 UTC; 7min ago
    Process: 3514241 ExecStart=/usr/bin/pgagent -v host=127.0.0.1 dbname=mydatabase >
   Main PID: 3514241 (code=exited, status=0/SUCCESS)

Mar 14 11:52:26 systemd[1]: Started pgAgent Job Scheduler.
Mar 14 11:52:26 pgagent[3514241]: PostgreSQL Scheduling Agent
Mar 14 11:52:26 pgagent[3514241]: Version: 4.0.0
Mar 14 11:52:26 systemd[1]: pgagent.service: Succeeded.
Gnani Kim
  • 61
  • 6

0 Answers0