0

I create a job to clean the database every day at 01:00.

According to statistic run OK from 3 months. But today i realize the database size was very big so i check the jobs and hasn't run for one month.

Properties say last run was '10/27/2014' and statistics confirm run successful.
Also say next run will be '10/28/2014' but looks like never run and stay frozen since then.
(I'm using dd/mm/yyyy format)

So why stop running?
There is a way to restart the job or should i go and delete and recreate the job?
How can i know a job didn't run?
I guess i can write a code if job isn't successful but what about if never execute?

enter image description here

Windows Server 2008
PostgreSQL 9.3.2, compiled by Visual C++ build 1600, 64-bit

Juan Carlos Oropeza
  • 47,252
  • 12
  • 78
  • 118
  • It looks like the run is successful. It's just not doing what you want. – Richard Huxton Nov 24 '14 at 16:44
  • If you look at the picture and description last successfull run was octuber 27. Today is November 24. So almost 30 day without running. – Juan Carlos Oropeza Nov 24 '14 at 16:49
  • Ah! I see - so this is what your screen looks like *today*. (1) Are there other jobs that have been running? and if not (2) Is the pgagent system service running on this Windows machine? – Richard Huxton Nov 24 '14 at 16:53
  • Ok, i think you got it. I just check the services. Even when pgagent say startup automatic. Didnt start it. I just start it now so I have to wait until 1:00 and see if run. Thanks. – Juan Carlos Oropeza Nov 24 '14 at 17:04
  • Check the event logs and see if there's a reason it stopped. Then you can add your own answer and accept it. – Richard Huxton Nov 24 '14 at 17:12

1 Answers1

0

The problem was the pgAgent service wasn't running.

When I Restart the Postgres service:

Postgres service stop
pgAgent stop because is a dependent service
Postgres service start
but pgAgent didn't

Here you can see pgAgent didn't start. enter image description here

Juan Carlos Oropeza
  • 47,252
  • 12
  • 78
  • 118