Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to know scheduled job run time?

Abhi33
Tera Expert

Hi,

How to know the time taken by a scheduled job to complete the run?

1 ACCEPTED SOLUTION

Arav
Tera Guru

Hi Abhi,

Please try this.

Go to https://<your instance URL>/syslog_transaction_list.do?sysparm_query=urlLIKE<your scheduled job name> and check the "Transaction processing time" column.

Alternatively, you can also add loggers in the scheduled job to track the time taken as indicated by Aman above. You can also take it to the next level by using Stop Watch API (see below for details).

https://developer.servicenow.com/dev.do#!/reference/api/rome/client/c_StopWatchAPI

Thanks,

Arav

View solution in original post

5 REPLIES 5

Musab Rasheed
Tera Sage

Hello,

Check below modules and see if you can find them ?

find_real_file.png

Please hit like and mark my response as correct if that helps

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

hi,

I would like to know the time taken to complete the job.

 

Check these out

https://community.servicenow.com/community?id=community_question&sys_id=71711f2ddbdcdbc01dcaf3231f961941

https://community.servicenow.com/community?id=community_question&sys_id=3c414fe5db98dbc01dcaf3231f9619ba

https://community.servicenow.com/community?id=community_question&sys_id=5651172ddbdcdbc01dcaf3231f96195d

Please hit like and mark my response as correct if that helps
Regards,
Musab

Aman Kumar S
Kilo Patron

You can follow below post to check the run time, but officially SN doesn't maintain the time, so it has to be logged in the scheduled job.

Where to find Job Log for a Scheduled Job that Ran?

Many people tracks the time when the job start running, you can also follow below format to check.

Keep 1st line of code in scheduled job as:

gs.info("execution starts for the job @ " + new GlideDateTime());

and last line as :

gs.info("execution ends for the job @ " + new GlideDateTime());

Best Regards
Aman Kumar