Scheduled job Clean Temp Files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2016 02:07 AM
Hi,
Was wondering if anyone can tell what the Scheduled job: Clean Temp Files really do, have not been able to find anything on the ServiceNow wiki.
But we do see get alot of warning messages in the Log table.
We keep getting these three warnings in our log:
1:
java.lang.SecurityException: Illegal access to method deleteFile(com.glide.script.proxy.File) in class com.glide.util.FileUtil
Caused by error in Schedule Item: 'Clean Temp Files' at line 1
==> 1: cleanTempDir(3600 * 1000 * 24, ["rb_", "sw_", "gw_", "att", "ids", "gurl"]);
2:
3: function cleanTempDir(age, tempFilePrefixes) {
4: var s = GlideSysFileUtil.getTempDir().getAbsolutePath();
2:
java.lang.SecurityException: Illegal access to method deleteFile(com.glide.script.proxy.File) in class com.glide.util.FileUtil
Caused by error in Schedule Item: 'Clean Temp Files' at line 6
3: function cleanTempDir(age, tempFilePrefixes) {
4: var s = GlideSysFileUtil.getTempDir().getAbsolutePath();
5: var dir = new Packages.java.io.File(s);
==> 6: var currentStamp = getCurrentStamp(dir);
7: var kids = dir.list();
8: for (var i =0; i < kids.length; i++) {
9: if (!prefixMatches(kids[i], tempFilePrefixes))
3:
java.lang.SecurityException: Illegal access to method deleteFile(com.glide.script.proxy.File) in class com.glide.util.FileUtil
Caused by error in Schedule Item: 'Clean Temp Files' at line 34
31: var f = new Packages.java.io.File(dir, n);
32: f.createNewFile();
33: var stamp = f.lastModified();
==> 34: GlideFileUtil.deleteFile(f);
35: return stamp;
36: }
Anyone have any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2016 10:14 AM
We are getting the same errors in our logs, we are on Helsinki, but recently upgraded from Eureka. Would love to clean this up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2016 02:10 AM
Colleagues, solution from HI (PRB683489😞
- Backup (Export XML) the existing sys_trigger rows: Schedule - All>Name = Clean Temp Files https://___INSTANCE_NAME___.service-now.com/sys_trigger_list.do?sysparm_query=name%3DClean%20Temp%20...
- Check the above link again and delete the rows.
- Download the file attached to this incident: sys_trigger_c10d485e0a0a0b170060611b99ccd00c.xml This is the OOB row from demonightlyhelsinki (where system_id = "All Nodes").
- Import the above XML file to the instance.
- Navigate to the above link again and there should be one row.
- Click on the row and then click on the "Execute Now" UI action.
- When the list renders again, you should see the appropriate rows for child nodes.
- Optionally, tail the application server localhost_log*.txt files and click on each row for each child node and click on "Execute Now", and verify that the scheduled job executes without error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2017 08:22 AM
I was going to test this out on our instance, but cannot access the PRB# and the XML file related to this. It is confirmed to be in the security and notable fixes for Istanbul under "Platform Miscellaneous". If anyone plans on cleaning this up before this, i'd open a HI ticket and reference the PRB# in order to get the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 11:01 AM
In case you need the file, I got this from my Istanbul developer instance.
Also note this appears to be listed in Istanbul security and notable fixes under Platform Misc - PRB683489