BusinessObjects Board

How to setup a report to retrieve schedule of pending jobs?

I want to prepare a BCA jobs listing which shows schedule (etc running periodicity, run time on each day…) of those scheduled tasks. How to setup the SQL for retrieving these information? Which table/field should be retrieved from Security Domain database?


littleblack :hong_kong: (BOB member since 2006-02-07)

all things concerning scheduled jobs are on ds_pending_jobs and you can use sql like following the list of scheduled jobs

select distinct
A.M_ACTOR_C_NAME AS SENDER,
D.M_DOC_C_NAME AS REPORT,
 CASE
    WHEN J.PRIORITY=1 THEN "Low"
    WHEN J.PRIORITY=2 THEN "Normal"
    WHEN J.PRIORITY=3 THEN "High"
  ELSE ""
  END AS PRIORITY,
  CASE
    WHEN J.FREQUENCY=4 THEN "Once"
    WHEN J.FREQUENCY=6 THEN "Once"
    WHEN J.FREQUENCY=8 THEN "Hourly"
    WHEN J.FREQUENCY=10 THEN "Hourly"
    WHEN J.FREQUENCY=16 THEN "Daily"
    WHEN J.FREQUENCY=18 THEN "Daily"
    WHEN J.FREQUENCY=32 THEN "Weekly"
    WHEN J.FREQUENCY=34 THEN "Weekly"
    WHEN J.FREQUENCY=64 THEN "Monthly"
    WHEN J.FREQUENCY=66 THEN "Monthly"
    WHEN J.FREQUENCY=128 THEN "Monthly Interval"
    WHEN J.FREQUENCY=130 THEN "Monthly Interval"
    WHEN J.FREQUENCY=256 THEN "User Defined"
    WHEN J.FREQUENCY=258 THEN "User Defined"
    ELSE ""
 END AS FREQUENCY,
CASE
    WHEN J.JOB_STATUS=0 THEN "Success"
    WHEN J.JOB_STATUS=1 THEN "Failure"
    WHEN J.JOB_STATUS=2 THEN "Waiting"
    WHEN J.JOB_STATUS=3 THEN "Running"
    WHEN J.JOB_STATUS=4 THEN "Suspended"
    WHEN J.JOB_STATUS=1001 THEN "Retrying(1)"
    WHEN J.JOB_STATUS=1002 THEN "Retrying(2)"
    WHEN J.JOB_STATUS=1003 THEN "Retrying(3)"
    WHEN J.JOB_STATUS=1004 THEN "Retrying(4)"
    WHEN J.JOB_STATUS=1005 THEN "Retrying(5)"
    WHEN J.JOB_STATUS=1006 THEN "Expired"
    ELSE "Still Running."
  END AS JOB_STATUS,
  J.JOB_SCRIPT
from
DS_PENDING_JOB J,
OBJ_M_ACTOR A,
OBJ_M_DOCUMENTS D
where
J.DOCUMENT_ID=D.M_DOC_N_ID
AND J.USER_SUBMIT_ID=A.M_ACTOR_N_ID
AND J.JOB_STATUS in (0, 2, 3)

bernard timbal :fr: (BOB member since 2003-05-26)

Hi,

You can also use this tool.

Regards

How about retrieving schedule time? e.g. a job is scheduled to be run daily at 8am…how can I get the time?


littleblack :hong_kong: (BOB member since 2006-02-07)

Hi,

You can also find this information in the tool I mentioned before.

Regards

In BO 6.5.1 BCA you can export the entire schedule to a .csv. Use CONSOLE>>>>EXPORT TO and then pick a name and a location. Use can use CONSOLE>>>OPTIONS to include as much information as you like. You can run a report from the resulting data set.


pcarbone :us: (BOB member since 2003-01-13)