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
‎11-09-2016 10:15 PM
Hi Alexander,
I don't think that's an Out of the box scheduled job. Perhaps it's a result of a customization within your company or by a third party customization you involved in your instance.
The fields created and created by perhaps can give you a better insight on its origin.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 01:59 AM
Hi Berny,
I find that a bit odd as I have just found the exact same schedule jobs on my ServiceNow Community Instance that I have just requested. So this should be OUT of the box stuff.
Look under System Schduler -> Scheduled Jobs -> Scheduled Jobs
Look for Clean Temp Files
Regards
Alexander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 07:40 AM
Interesting. I checked in Geneva and Helsinki instances and couldn't find it.
Thanks,
Berny

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2016 02:40 AM
We have same issue, please assist
Maybe GlideFileUtil.deleteFile(f); should be GlideSysFileUtil.deleteFile(f); or f.delete();
*Warnings appears only on DEV/STG instances upgraded from FUJI to HELSINKI, same Job on production FUJI executes without warnings.
Does it mean, that is rudiment that can be disabled?