How to check status of Background Scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2016 12:46 AM
Hi,
I am trying a Background Script to delete "Next hop Routing rule" CIs from CMDB using the following script. It has ran for quite a large time as it needs to delete nearly 400 million Cis. However after 2 days when I re checked only 200 Million CIs got deleted and I am not sure what happened in between. I wantedto know how can I check logs of background scripts to determine the cause.
doit("dscy_route_next_hop");
function doit(table) {
var gr = new GlideRecord(table);
gr.query();
gr.deleteMultiple();
}
Regards,
Rakesh Imandi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2016 01:15 AM
400 million woah
I'd break that one down - you can include some logging , but at that volume it's going to slow down and clog the logs
you can see from system logs what script was executed , I don't know how much more detail you will get
can you not just empty the table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2016 11:21 PM
Yes, I would agree with mrswann.
It is pure code thing. You can print a message when finishing 100K or 1m records.
The log will only show up some necessary message in terms of troubleshooting purpose, and won't give us the progress.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2023 07:29 AM
Hi @Rakesh16i ,
We can use Table Cleaner (Auto Flush) option to delete bulk records in CMDB. we dont need any coding for it.
these tables are populate CI's on every discovery schedules so I have created Auto Flush on this table.
Note# this is quite old post but my response would help for someone to delete bulk records from any CMDB table.
Regards,
Vinil.