Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Do we have any table to list our Schedule jobs and their run status?

Priyadharsini
New Contributor
New Contributor

Do we have any table to list our Schedule jobs and their run status?

4 REPLIES 4

NM
Honored Contributor II
Honored Contributor II

Hi @Priyadharsini , ecmimportjob table will provide you with the details.

Raghu
All-Star
All-Star

@Priyadharsini  try below query in reports and run it

select
  a.ANALYTICSNAME,
  a.CREATEDATE 'Created On',
  a.LASTRUN 'Report previous Run',
  qt.TRIGGER_NAME 'Job Name',
  qct.CRON_EXPRESSION,
  FROM_UNIXTIME(qt.NEXT_FIRE_TIME/1000) 'Job next fire time',
  FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000) 'Job previous fire time',
  case
    when FROM_UNIXTIME(qt.Next_FIRE_TIME/1000) > now()=1 and date(FROM_UNIXTIME(qt.Next_FIRE_TIME/1000))=date(now()) then 'Yet to run'
    when date(a.lastrun)=date(FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000)) and date(FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000))=date(now()) then 'Report ran successful as scheduled'
    when date(a.lastrun)!=date(FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000)) and date(FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000))=date(now()) then 'Report run mismatch'
  end as 'Report run status',
  a.METADATA 'Run summary details'
from
  analyticsconfiges a, qrtz_triggers qt, qrtz_cron_triggers qct
where
  qt.TRIGGER_NAME=concat('Analytics_',a.ANALYTICSKEY,'CRONE')
  and qt.TRIGGER_NAME=qct.TRIGGER_NAME


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

rushikeshvartak
All-Star
All-Star
  • qrtz_triggers trigger stores all job related information
  • This table is exposed from analytics and not from data analyzer 
  • For Report use below query 

 

 

select
  a.ANALYTICSNAME,
  a.CREATEDATE 'Created On',
  a.LASTRUN 'Report previous Run',
  qt.TRIGGER_NAME 'Job Name',
  qct.CRON_EXPRESSION,
  FROM_UNIXTIME(qt.NEXT_FIRE_TIME/1000) 'Job next fire time',
  FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000) 'Job previous fire time',
  case
    when FROM_UNIXTIME(qt.Next_FIRE_TIME/1000) > now()=1 and date(FROM_UNIXTIME(qt.Next_FIRE_TIME/1000))=date(now()) then 'Yet to run'
    when date(a.lastrun)=date(FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000)) and date(FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000))=date(now()) then 'Report ran successful as scheduled'
    when date(a.lastrun)!=date(FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000)) and date(FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000))=date(now()) then 'Report run mismatch'
  end as 'Report run status',
  a.METADATA 'Run summary details'
from
  analyticsconfiges a, qrtz_triggers qt, qrtz_cron_triggers qct
where
  qt.TRIGGER_NAME=concat('Analytics_',a.ANALYTICSKEY,'CRONE')
  and qt.TRIGGER_NAME=qct.TRIGGER_NAME

 

 

 

 

select
  qt.TRIGGER_NAME 'Job Name',
  qct.CRON_EXPRESSION,
  FROM_UNIXTIME(qt.NEXT_FIRE_TIME/1000) 'Job next fire time',
  FROM_UNIXTIME(qt.PREV_FIRE_TIME/1000) 'Job previous fire time'
from
  qrtz_triggers qt, qrtz_cron_triggers qct
where
 
  qt.TRIGGER_NAME=qct.TRIGGER_NAME

 

 

  • rushikeshvartak_2-1721158111404.png

     


     


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

dgandhi
All-Star
All-Star

Use below query

dgandhi_0-1721162807081.png

 

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.