PgAgent probably not installed
The pgAgent download page says:
pgAgent is a job scheduler for PostgreSQL that can be managed using pgAdmin. Prior to pgAdmin v1.9, pgAgent is dispatched as part of pgAdmin. Starting with pgAdmin v1.9, pgAgent is shipped as a standalone application .
And then it provides a download link http://www.postgresql.org/ftp/pgadmin3/release/pgagent/
But the problem is that there is only source code. There are also SQL files in tarball, but they are useless without pgagent.exe .
How to install it
Apparently, the correct way to install the precompiled pgAgent is with the Stack Builder installer, which is also the main Windows installation method for the PostgreSQL server itself. This is what is offered on the official download page: http://www.postgresql.org/download/windows/
If you have already installed PostgreSQL for Windows using this method, the installer is available under the name Application Stack Builder in the PostgreSQL 9.2 folder in the Windows Start menu.
StackBuilder usually recognizes your installed versions of PostgreSQL and offers to install pgAgent between the various programs in the Add-ons, tools and utilities category. Once you check pgAgent and proceed with the installation, it will download it and start configuring it. The installation phase includes starting the necessary SQL statements and installing the PostgreSQL scheduling Agent - pgAgent windows. If this step is successful, there is nothing more to do, the functionality will be available in pgAdmin for creating tasks.
What is misleading in the docs
The latest pgAdmin docs at http://www.pgadmin.org/docs/1.16/pgagent-install.html have a Service Installation on Windows that says:
The service can be installed quite simply from the command line, because (setting the path as necessary):
"C: \ Program Files \ pgAdmin III \ pgAgent" INSTALL pgAgent -u postgres -p secret hostaddr = 127.0.0.1 dbname = postgres user = postgres
However, in most cases this will not help, because:
- The pgAgent installation is performed by the pgAgent installation launched by StackBuilder, and this step is not required.
- or you only have pgAdmin and
pgagent.exe will not be installed, so this step is not possible.