pgadmin not processing scheduled jobs - Mailing list pgsql-admin

From Robert Young
Subject pgadmin not processing scheduled jobs
Date
Msg-id c3df65eb0810241342u5f91731aubfaf839fd8416b2b@mail.gmail.com
Whole thread Raw
Responses Re: pgadmin not processing scheduled jobs
List pgsql-admin
I've ran the pgagent.sql script against my database.  I've started the pgagent as you can see...

  501  3107  1219   0   0:00.06 ttys000    0:00.12 pgagent -f -l 2 host=localhost dbname=mydb user=myuser

pgagent output shows...

laptop:~ ryoung$ pgagent -f -l 2 host=localhost dbname=mydb user=myuser
DEBUG: Creating primary connection
DEBUG: Creating DB connection: host=localhost dbname=mydb user=myuser
DEBUG: Database sanity check
DEBUG: Clearing zombies
DEBUG: Checking for jobs to run
DEBUG: Sleeping...
DEBUG: Clearing inactive connections
DEBUG: Connection stats: total - 1, free - 0, deleted - 0
DEBUG: Checking for jobs to run
DEBUG: Sleeping...
DEBUG: Clearing inactive connections
DEBUG: Connection stats: total - 1, free - 0, deleted - 0
DEBUG: Checking for jobs to run
DEBUG: Sleeping...
DEBUG: Clearing inactive connections
........

as you can see, no jobs to run are found.

here is the pgagent.pga_job table.  Notice that the jobagentid is null as well as the joblastrun field.

mydb=# select * from pgagent.pga_job;
 jobid | jobjclid | jobname | jobdesc | jobhostagent | jobenabled |          jobcreated          |          jobchanged          | jobagentid |          jobnextrun           | joblastrun
-------+----------+---------+---------+--------------+------------+------------------------------+------------------------------+------------+-------------------------------+------------
     1 |        1 | test    |         | 127.0.0.1    | t          | 2008-10-24 11:04:40.86785-06 | 2008-10-24 11:04:40.86785-06 |            | 2008-10-24 12:56:49.378361-06 |


here is the output from the pgagent.pga_jobagent table.  As you can see, the agent is set in this table.

mydb=# select * from pgagent.pga_jobagent;
 jagpid |         jaglogintime          |       jagstation       
--------+-------------------------------+-------------------------
   3108 | 2008-10-24 12:55:26.271553-06 | laptop.movenetworks.com

pgagent.pga_schedule table output.

mydb=# select * from pgagent.pga_schedule;
 jscid | jscjobid | jscname | jscdesc | jscenabled |        jscstart        | jscend |                                                        jscminutes                                                         |                     jschours                      |   jscweekdays   |                           jscmonthdays                            |         jscmonths        
-------+----------+---------+---------+------------+------------------------+--------+---------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------+-----------------+-------------------------------------------------------------------+---------------------------
     1 |        1 | 1       |         | t          | 2008-10-24 11:05:00-06 |        | {f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f} | {f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f} | {f,f,f,f,f,f,f} | {f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f} | {f,f,f,f,f,f,f,f,f,f,f,f}
(1 row)


pgagent.pga_step table output.

mydb=# select * from pgagent.pga_jobstep;
 jstid | jstjobid | jstname |       jstdesc       | jstenabled | jstkind |                jstcode                 | jstdbname | jstonerror | jscnextrun
-------+----------+---------+---------------------+------------+---------+----------------------------------------+-----------+------------+------------
     1 |        1 | 1       | 2008-10-15 00:00:00 | t          | s       | update db_version set push_dt = now(); | mydb    | f          |

Everything looks accurate to me.  If I click on the 'run now' link in pgadmin3 it updates the date on the job table, but it still finds no jobs to run.

Any help would be appreciated.

Thanks




pgsql-admin by date:

Previous
From: Alexander Stanier
Date:
Subject: Change in logging behaviour between 8.1 and 8.2
Next
From: "Robert Young"
Date:
Subject: Re: pgadmin not processing scheduled jobs