- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2018 11:47 PM
Hello friends,
I written a scripted scheduled on daily basis, that basically to glide record of CMDB_Computer Table and as per the condition it’s to update 11000 records. I can observer that scheduled job is working for all records as per glide record conditions. I print some messages that are common for all. I can see out of 10000+ only 2500+ messages has been printed in logs.
Due to this issue, the update transactions on records that scheduled job has to perform is not performing and because of this problem many results and expected values we are getting.
Yesterday, I stop many print messages from Script job and Script Include functions as well. Any reasons why this happening or Scheduled Job Operations are getting time out.
Thanks,
Basant
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2018 02:44 AM
You could break your script down and use "scheduleonce" to schedule parts of the code and have it run asynchronously. For instance divide the records into arrays of 1000 records and then do the schedule once. There is an article on the topic here:
http://www.john-james-andersen.com/blog/service-now/call-a-servicenow-script-asynchronously-with-scheduleonce-api.html
It is a little difficult to help, not knowing what code you are trying to run, but I hope this helps!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2018 12:06 AM
Hi,
Could you please provide the scheduled job mentioned.
Greetings
Fabian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2018 12:22 AM
It is difficult to say without knowing the code that you are trying to run. Could you please share the code that you are having issues with?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2018 02:22 AM
Hi Friends,
Thanks for rely. But i wont be able to paste the code here. since it's too big. put print message that should return row count : gs.print('Total Number of Records : Schedule Job New :' +gr.getRowCount()); but it's printing this message.
I think, Scheduled Job or Background Script or Fix Script is not processing all records. it's getting timeout and cancelling DB Translations.
Do we have many API's or any solutions that'll perform db translation from a Scheduled Job or Background in chunks. i think that will help us here.
thanks,
Basant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2018 02:44 AM
You could break your script down and use "scheduleonce" to schedule parts of the code and have it run asynchronously. For instance divide the records into arrays of 1000 records and then do the schedule once. There is an article on the topic here:
http://www.john-james-andersen.com/blog/service-now/call-a-servicenow-script-asynchronously-with-scheduleonce-api.html
It is a little difficult to help, not knowing what code you are trying to run, but I hope this helps!