How to get the list of all the jobs ran since a specific date?

book

Article ID: 17005

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent

Issue/Introduction



How to get the list of all the jobs ran since a specific date?

Environment

WAAE 11.3.5 and 11.3.6 Release

Resolution

You can proceed by the following steps to get the list of all the jobs ran since a specific date:

Example: Since 1 December 2017

 

1.  Run the “time0” command to get the internal format for the date 1 December 2017:

 

$ time0 -T "12/01/2017 00:00:00"

 CAUAJM_I_50099 Autotime(internal): 1512104400

 

2. Then run the following query which will return the list of all the jobs ran since 1 December 2017:

 

select distinct(job_name) from ujo_job, ujo_job_runs where ujo_job.joid = ujo_job_runs.joid and ujo_job_runs.startime > 1512104400 ;

 

 

Additional Information

Note: If additional job run info for this is also needed, a query like this might help

1613106000  epoch time for "2/12/2021 00:00:00"


set linesize 1000
set pagesize 1000

select distinct(job_name), ujo_job_runs.run_num, To_Char( To_Date( '01.01.1970 06:00:00','DD.MM.YYYY HH24:Mi:Ss') + ujo_job_runs.STARTIME / 86400,'MM/DD/YYYY HH24:Mi:ss'), 
To_Char( To_Date( '01.01.1970 06:00:00','DD.MM.YYYY HH24:Mi:Ss') + ujo_job_runs.ENDTIME / 86400,'MM/DD/YYYY HH24:Mi:ss'),  ujo_job_runs.EXIT_CODE 
from ujo_job, ujo_job_runs where ujo_job.joid = ujo_job_runs.joid and ujo_job_runs.startime > 1613106000 
-- you can add below machine filtering too, 
-- to restrict query by a specific machine name
and ujo_job_runs.RUN_MACHINE like '%YOUR-Machine-Name-where-your-jobs%' ;