- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2018 06:49 AM
Hi,
I have created one post clone cleanup script. I am not seeing it executed after the cloning.
Where can I check if its run or not run? Where to check the logs of any failure of this script?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2018 05:32 PM
Hello Kushal,
After a clone completes the post clone cleanup script is created as a scheduled job and runs to completion and then is removed.
The best way to audit and keep a track of if the script runs is to add log statements in the job so you can audit it quickly.
EG:
gs.log("Starting Script to remove email configuration");
< Code to process >
gs.log("Script to remove email configuration is completed");
You can also put some log statements in the code to give more details instead of just start and finish, you can add counts and checks to better debug the script if it didnt work as intended.
Regards,
Simon

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2025 05:35 PM
I reviewed this again and in our clone FAQ we go over this. So we are still restricted by RCA and granting permissions, so HR is a specific app that is locked down in a way that you wouldn't be able to create those specific jobs causing a security issue unless already approved and created.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0715621#mcetoc_1h7f77i69ag
hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2025 08:48 PM
And the single threaded clone cleanup scheduled script does not use try/catch so if one script fails, all subsequent scripts do not run?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 01:16 PM - edited 06-13-2025 01:19 PM
I believe so based on the article shared. That could be the only possible reason why my scripts also aren't executing

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 04:24 PM
Yes that could be why, you can put specific logs in your cleanup scripts to confirm if they run, I know a number of customers so this so they can quickly audit if the job ran and how many records were adjusted.
But yes unfortunately if an earlier script fails then the other scripts after will fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2025 03:54 PM
Clone cleanup scripts ran as scheduled jobs as the 'system' user previously. if this behavior hasn't changed, you will need a workaround.