PgAgent is probably not installed
The pgAgent download page says:
pgAgent is a job scheduler for PostgreSQL which may be managed using
pgAdmin. Prior to pgAdmin v1.9, pgAgent shipped as part of pgAdmin.
From pgAdmin v1.9 onwards, pgAgent is shipped as a separate
application.
And then it provides a download link to http://www.postgresql.org/ftp/pgadmin3/release/pgagent/
But the problem is there's only source code there. There are also SQL files in the tarball but they're useless without pgagent.exe
.
How to install it
Apparently the correct way to install a pre-compiled pgAgent
is with the Stack Builder installer that also happens to be the primary installation method on Windows for the PostgreSQL server itself. That's what is suggested on the official download page:
http://www.postgresql.org/download/windows/
If you have already installed PostgreSQL for Windows with this method, the installer is available under the name Application Stack Builder
in the PostgreSQL 9.2
folder in Windows Start Menu.
StackBuilder will normally recognize your installed PostgreSQL version(s), and suggest to install among various programs pgAgent in the Add-ons, tools and utilities
category.
Once you check pgAgent and continue with the installation, it will download it and launch its setup. The setup phase includes runnning the necessary SQL statements and installing the PostgreSQL scheduling Agent - pgAgent
windows service. If this step is successful, there is nothing else to do, the functionality will be available in pgAdmin for creating jobs.
What's misleading in the docs
The latest pgAdmin docs at http://www.pgadmin.org/docs/1.16/pgagent-install.html has a Service installation on Windows chapter that says:
The service may be quite simply installed from the command line as
follows (adjusting the path as required):
"C:\Program Files\pgAdmin III\pgAgent" INSTALL pgAgent -u postgres -p
secret hostaddr=127.0.0.1 dbname=postgres user=postgres
However in the majority of cases this is not going to be of help because either:
- pgAgent install is done by pgAgent setup as launched by StackBuilder and this step is not necessary.
- or you have got pgAdmin alone and
pgagent.exe
will not be installed so this step is not possible.
psql
will do you no good. Edit your question and add the exact error you get. Add a screenshot showing it if that's easier. Then comment here so notifications are sent. – Theodosia