Scheduling jobs for regular background execution
Normal user tasks cause the user to wait while the task executes. Frequently, there is a requirement to run tasks or “jobs” in the background without the user present, which is referred to as a job scheduler component. You can use cron, but some users look for an in-database solution.
pgAgent is our recommended job scheduler for Postgres, which isn’t supplied as part of the pgAdmin package, but as a separate component. pgAgent can be operated from the pgAdmin GUI or using a simple command-line API. pgAgent keeps a history of job executions so that you can see what is happening and what is not happening.
Getting ready
If you want to manage a new database from an existing pgAgent installation, then you don’t need to prepare anything. If you want to set up a new pgAgent database, execute the following command:
CREATE EXTENSION pgagent;
pgAgent is an external program, not a binary plugin...