Why fix script runs every time I install the plugin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2018 11:17 PM
Hi, all
I have a fix script in the scoped plugin, usually fix script runs when we upgrade from lower version to a higher version and it always work like this.
However, this time the fix script I have runs every time after I zbooted and install the plugin, is this an expected behavior? If so, do we have a way to prevent this?
Here is the setting of my fix script:
active: true
before: false
flush_cache: false
run_once: true
unloadable: false
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2018 11:33 PM
How do I run a fix script only when upgrade?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2018 11:35 PM
The documentation is as follows:
Run once | Select the check box to run the script only one time (default). The fix script is ignored for subsequent upgrades. Clear the check box allow the script to run every time the application is installed or upgraded. This option is enforced by the following mechanism.
Run once is not enforced when you test the fix script. |
Does this contradict your experience?
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2018 11:39 PM
So even when I mark run_once to be true, the fix script will still run when I install the plugin, say I only want to run this fix script when I upgrade, but not when I install, is there a way? thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2018 11:44 PM
You would need to clear the 'run once' checkbox but add a precondition to determine if the plugin is installed for the first time and not run in that scenario.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022