How To Install PgAgent On Windows (PostgreSQL Job Scheduler)

This is a surprise for me that PostgreSQL do not have any build-in job scheduler. However It did pack into pgAdmin source but i wonder why it didnt intsall it by default? Here i provide some steps to show how to install pgAgent(Job Scheduler) on windows as services

1) Go to your PgAdim file path like below, please change to your own pgAdmin file path like “C:\Program Files\PostgreSQL\8.2\pgAdmin III”

pgagent-install-step1

2) Get pgAgent.sql and execute the script, it will create all pgAgent core tables

pgagent-install-step2

3) After executed pgAgent script, user will notice one job icon appear at pgAdmin.

pgagent-install-step3

4) Job scheduler is still not working yet, you have to register it as services in windows. Please issue following command on command prompt

C:\Program Files\PostgreSQL\8.2\bin\pgAgent INSTALL pgAgent -u postgres 
-p secret hostaddr=127.0.0.1 dbname=newdb user=postgres password=secret

please issue C:\Program Files\PostgreSQL\8.2\bin\pgAgent to show usage of pgAgent, where
-u = username
-p = password
“hostaddr=127.0.0.1 dbname=newdb user=postgres password=secret” = connect string

P.S please notice INSTALL is all uppercase, do not type lowercase , it will not work.

5) After registered service on windows, just go windows service to start it or use net start command.

pgagent-install-step4

6) Done, we can start to schedule our job now.

Fuente: http://www.mkyong.com/database/how-to-install-pgagent-on-windows-postgresql-job-scheduler/

Publicado el 24 julio, 2012 en Postgresql. Añade a favoritos el enlace permanente. 4 comentarios.

  1. Hello! Someone in my Myspace group shared this website with us so
    I came to give it a look. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers!
    Superb blog and wonderful style and design.

  2. I drop a leave a response each time I like a article on a
    website or if I have something to contribute to the conversation.
    Usually it’s caused by the passion displayed in the article I browsed. And after this article How To Install PgAgent On Windows (PostgreSQL Job Scheduler) | Ivanchoboy’s Blog.
    I was actually excited enough to post a thought🙂 I actually
    do have a few questions for you if you usually do not mind.
    Is it just me or does it look as if like some of the comments appear
    like coming from brain dead people?😛 And, if you are posting on
    additional social sites, I’d like to follow anything new you have to post. Could you make a list every one of your community sites like your twitter feed, Facebook page or linkedin profile?

  3. Not so far I have found new cool tool to work with postgresql on win – Valentina Studio. Its free edition can do things more than many commercial tools!!
    I very recommend check it. http://www.valentina-db.com/en/valentina-studio-overview

  4. I love what you guys tend to be up too. Such clever work and exposure!
    Keep up the very good works guys I’ve included you guys to my own blogroll.

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s

A %d blogueros les gusta esto: