pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgadmin not processing scheduled jobs
3+ messages / 2 participants
[nested] [flat]

* pgadmin not processing scheduled jobs
@ 2008-10-24 20:42 Robert Young <robbyoung21@gmail.com>
  2008-10-24 21:00 ` Re: pgadmin not processing scheduled jobs Robert Young <robbyoung21@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Robert Young @ 2008-10-24 20:42 UTC (permalink / raw)
  To: 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

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgadmin not processing scheduled jobs
  2008-10-24 20:42 pgadmin not processing scheduled jobs Robert Young <robbyoung21@gmail.com>
@ 2008-10-24 21:00 ` Robert Young <robbyoung21@gmail.com>
  2008-10-25 02:43   ` Re: pgadmin not processing scheduled jobs Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Robert Young @ 2008-10-24 21:00 UTC (permalink / raw)
  To: pgsql-admin

I've solved the issue.  pgagent.pga_job.jobhostagent must be blank.  Thanks
to this link http://forums.enterprisedb.com/posts/list/1419.page

Anyway, the docs say ... "optionally the hostname of a specific machine
running pgAgent, if this job should only run on that specific server. If
left empty, any server may run the job. This is not normally an issue for
SQL-only jobs, however any jobs with batch/shell steps may need to be
targetted to a specific server." ..., so why didn't it work when I specified
the host of 127.0.0.1 or localhost?

Thanks

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgadmin not processing scheduled jobs
  2008-10-24 20:42 pgadmin not processing scheduled jobs Robert Young <robbyoung21@gmail.com>
  2008-10-24 21:00 ` Re: pgadmin not processing scheduled jobs Robert Young <robbyoung21@gmail.com>
@ 2008-10-25 02:43   ` Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Scott Marlowe @ 2008-10-25 02:43 UTC (permalink / raw)
  To: Robert Young <robbyoung21@gmail.com>; +Cc: pgsql-admin

On Fri, Oct 24, 2008 at 3:00 PM, Robert Young <robbyoung21@gmail.com> wrote:
> I've solved the issue.  pgagent.pga_job.jobhostagent must be blank.  Thanks
> to this link http://forums.enterprisedb.com/posts/list/1419.page
>
> Anyway, the docs say ... "optionally the hostname of a specific machine
> running pgAgent, if this job should only run on that specific server. If
> left empty, any server may run the job. This is not normally an issue for
> SQL-only jobs, however any jobs with batch/shell steps may need to be
> targetted to a specific server." ..., so why didn't it work when I specified
> the host of 127.0.0.1 or localhost?

I'm just guessing, but it could be that your machine is setup to use
local unix sockets and not allow tcp/ip connections.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2008-10-25 02:43 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-10-24 20:42 pgadmin not processing scheduled jobs Robert Young <robbyoung21@gmail.com>
2008-10-24 21:00 ` Robert Young <robbyoung21@gmail.com>
2008-10-25 02:43   ` Scott Marlowe <scott.marlowe@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox