Installation
Step 1
Installation of pgAdmin 4
sudo apt install pgadmin4 pgadmin4-apache
Step 2
Creation of plpgsql procedural language if not defined
CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
HANDLER plpgsql_call_ handler
HANDLER plpgsql validator;
Step 3
Installation of pgAgent
sudo apt-get install pgagent
Step 4
Creation of the pgagent extension
CREATE EXTENSION pageant
In order to define a new job, it's only necessary select "Create" using the right button on "pgAgent Jobs", and it'll insert a designation for this job and define the steps to execute it:
Step 5
Finally, to have the agent running in the background it's necessary to launch the following process manually:
/usr/bin/pgagent host=localhost dbname=postgres user=postgres port=5432 -l 1