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.

Scheduled Job Memory Drain Problems

JayGervais
Kilo Sage

I am wondering if anyone has some advice on this situation?

I created a schedule job to import laptop data for our organization (currently in Test). We have around 50k devices. The job is scheduled to run once/week on a Friday to avoid slowing down the instance during work hours. It works be calling a REST Message to the Google API to collect data and uses an import table to copy the devices to the cmdb_ci_computer table. There is also an onAfter script, which updates the states and substates on the alm_hardware table for the associated record.

This has been working correctly but it runs non-stop and takes nearly a week to get through all the records. This triggered a P2 ticket for draining the memory of our instance too, but I was not able to get advice from ServiceNow due to this being a custom creation.

Has anyone done anything like this before who could offer advice, or is there a better way to import large amounts of data than what I am doing?

5 REPLIES 5

No worries, and FYI, your PROD instance should have more nodes hence more 'processing' power. But that doesn't mean that you shouldn't optimise this 🙂