- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2014 01:16 PM
I have a scheduled import running every 15 minutes grabbing information from a csv file via https connection. do I need to add a script on it to clean up the import set table after each time it is run? If so where should I put it, and does anyone have any examples?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2014 01:34 PM
You can write a Schedule clean up script,
var gr = new GlideRecord("ImportSet_table_name");
gr.query();
gr.deleteMultiple();
.. should work for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2014 01:18 PM
Here is what you are looking for : Import Set Scheduled Cleanup - ServiceNow Enterprise Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2014 01:31 PM
No, I'm refering to a seperate clean-up intended for this import set table only. since the csv file being imported will be growing every 15 minutes (due to our internal process) and the update set table will be growing every 15 minutes (due to the scheduled import) this single table will become quite large before this weekly clean up you're referring to is ran. I'm thinking more along the lines of a post run script on this scheduled import set to delete all the rows only in this import set table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2014 01:34 PM
You can write a Schedule clean up script,
var gr = new GlideRecord("ImportSet_table_name");
gr.query();
gr.deleteMultiple();
.. should work for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2014 01:41 PM
Nailed it! Thanks man