Scheduled Job (sys_trigger) Behaviour

Kumar38
Kilo Sage

I need a report/Dashboard on few Scheduled Jobs that were successful and that failed . Thinking of using (sys_trigger) table .

1. what would be the state after the Job failed  , would it return back to Ready , populating "Last Error Field"?

2. When do I know if a scheduled Job completed , when it moves state from Running to Ready ?

2 REPLIES 2

Anil Shewale
Mega Guru

Hi

A scheduled job can be in any one of the following states.

Ready

The job is ready to run at the next scheduled interval.

Running

The job is in the process of carrying out a task.

Queued

The job has been added to the scheduler queue and is waiting to run.

Error

An error occurred in running the job.

 if you look in the SN menu, under System Logs -> Transactions (Background), one would think you would find execution statistics about all executed jobs.  But unfortunately, that is not the case.  It is actually the same view as the one available under System Scheduler -> Scheduled Jobs -> Slow Job Log.  Only scheduled jobs that have an execution time of more than 1 second are shown in those views.

In the end, the sys_trigger table (System Scheduler -> Scheduled Jobs -> Scheduled Jobs) is where you have a record of each scheduled job execution.  And adding the Process duration, Run count, Updated and Updated by fields to the sys_trigger table list and form will allow you to have a complete picture of the last job(s) execution.

 

If it help mark helpful or correct 

Thanks and regards

Anil

Hi,

Thanks for the Explanation. Would the state remain in error forever , when it has a error or does it go for next scheduled Run changing its status. This would help me understand how to do a report on failed Jobs as I need to report on failed Jobs over a Period of time.