Solved

Schedule Database Task Logs

  • 14 January 2021
  • 2 replies
  • 270 views

Userlevel 4
Badge +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.

 

icon

Best answer by durette 12 February 2021, 23:03

View original

This topic has been closed for comments

2 replies

Userlevel 7
Badge +18
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?

 

Userlevel 4
Badge +10

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