When I'm executing schedule job, record is not getting created in Transaction log properly.

Raghu Ram Y
Kilo Sage

When I'm executing schedule job, record is not getting created in Transaction log with type as "Scheduler" instead of that it was creating in some random types like "Form" and other things..

why so? 

.

.

@Ankur Bawiskar  @Community Alums 

9 REPLIES 9

Community Alums
Not applicable

Hi @Raghu Ram Y ,

 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.

Note : All this is somewhat confusing and should not to be confused with the scheduled jobs definition, which are found in the sysauto table, under System Definition -> Scheduled Jobs.

I mention it because that is exactly what I did initially : manually creating a scheduled job instance under System Scheduler -> Scheduled Jobs -> Scheduled Jobs, thinking it was where the scheduled jobs were defined, instead of using System Definition -> Scheduled Jobs.

Ankur Bawiskar
Tera Patron
Tera Patron

@Raghu Ram Y 

share more details such as screenshots etc

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks @Ankur Bawiskar for your response..

 

Step 1: The below is the schedule job, I'm using(sample job)

 

RaghuRamY_0-1668501788839.png

 

Step 2:  Clicked on "Execute Now"

Step 3: Navigated to "Transaction log" table and filtered with "job name" in the URL field.

RaghuRamY_1-1668501894198.png

Step 4: but here I can see records under "Form" and "LIST" but there is no record found under the "Scheduler

 

My questions:

1. Why there is no record under scheduler?

2. My requirement is to get the "Start time" and "Total process time" of the some schedule jobs..

3. I want to take report of it.. but in some knowledge article I have seen that we should not do reporting on "sytem tables"

4. So I'm planning to write business rule and create a new record in new table.. by filtering records with URL field.. but somehow I'm not able to see URL as "JOB: schedule job name" with type as "Scheduler"

 

Please help me to understand @Ankur Bawiskar  

 

 

@Ankur Bawiskar can you please help?