Skip to main content
Solved

Schedule Database Task Logs

  • January 14, 2021
  • 2 replies
  • 309 views

Forum|alt.badge.img+10

Hello,

We are converting Database Processes to Scheduled database Tasks, IFS8.

I have few tasks that checks batch log and send emails accordingly, when i created in schedule database tasks, its sending same info again and again… how do i check the logs in Database Tasks or in Background Jobs , if any to accomplish this task.

 

the query to modify is following, or any other way to achieve same result

SELECT lag(actual_start_date,1) over (order by actual_start_date) last_date
   FROM batch_job bj, batch_job_log bjl
   WHERE action = 'Temporay_API.Generate_Report'
   and bj.job_id = bjl.job_id
   and bjl.status = 'SUCCEEDED'
   order by actual_start_date desc;

 

Thanks.

 

Best answer by durette

SELECT id,
created,
posted,
started,
executed,
LAG(started, 1) OVER(ORDER BY id) AS last_started_date
FROM transaction_sys_local_tab t
WHERE state = 'Ready'
AND procedure_name = 'Temporay_API.Generate_Report'
ORDER BY id DESC;

Does this work?

 

This topic has been closed for replies.

2 replies

durette
Superhero (Customer)
Forum|alt.badge.img+19
  • Superhero (Customer)
  • 542 replies
  • Answer
  • February 12, 2021
SELECT id,
created,
posted,
started,
executed,
LAG(started, 1) OVER(ORDER BY id) AS last_started_date
FROM transaction_sys_local_tab t
WHERE state = 'Ready'
AND procedure_name = 'Temporay_API.Generate_Report'
ORDER BY id DESC;

Does this work?

 


Forum|alt.badge.img+10
  • Author
  • Sidekick (Customer)
  • 105 replies
  • February 15, 2021

thanks @durette  Yes, i was able to find this tables reading thru some other threads.