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 much memory and resources it costs to run a scheduled job ?

Aram Sosa
Tera Expert

Hello folks around the world!
I have a script that calculates the technical debt of my client, it is in a scheduled job.

I need to know how many resources (specifically memory) this scheduled job uses when running, because so far we have been working with dummy data and we are close to adding a lot of real data, and we need to know how many resources it costs and will cost us to use this script.
Does anyone know of a way to see how much memory is used when running a specific scheduled job?
Any help would be greatly appreciated!

1 REPLY 1

Robert H
Mega Sage

Hello @Aram Sosa ,

 

Go to "System Logs > Transactions" and and search for the transaction that corresponds to the last run of your job. You can find it by filtering for "URL" = "JOB: {the name of your job}". The Transaction Log record captures a lot of information about the resource usage, e.g. SQL and CPU usage. Memory usage is not captured, though.

But frankly, I wouldn't worry about running out of memory on a standard ServiceNow customer instance, unless your job is doing very expensive things like nested loops on large data sets.

 

Out of curiosity: how do you calculate "technical debt" using a script?

 

Regards,

Robert