# Setting system parameters via script console

**URL:** <https://community.jenkins.io/t/setting-system-parameters-via-script-console/32889>\
**Category:** Ask a question\
**Created:** [June 16, 2025, 9:31am UTC](https://community.jenkins.io/t/setting-system-parameters-via-script-console/32889 "2025-06-16T09:31:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jumpingkangaroo](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jumpingkangaroo](https://community.jenkins.io/u/jumpingkangaroo)\
**Post date:** [June 16, 2025, 9:31am UTC](https://community.jenkins.io/t/setting-system-parameters-via-script-console/32889/1 "2025-06-16T09:31:05Z")

</div>

Hi,

We have our shared workspaces deleted every 30 days, which we don’t want, and have read posts regarding the workspace clean up settings. I`m unable to restart jenkins as we are in the middle of our release build window but can i set system parameters via the Manage Jenkins → Script console?

I want to set **hudson.model.WorkspaceCleanupThread.disabled=true** to see if this stops the workspaces from being deleted.

Thanks

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [June 16, 2025, 10:51am UTC](https://community.jenkins.io/t/setting-system-parameters-via-script-console/32889/2 "2025-06-16T10:51:15Z")

</div>

Yes you can do this via script console. It should stop the cleanup thread from executing

---

<div class="post-metadata">

**Author:** ![jumpingkangaroo](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jumpingkangaroo](https://community.jenkins.io/u/jumpingkangaroo)\
**Post date:** [June 16, 2025, 11:04am UTC](https://community.jenkins.io/t/setting-system-parameters-via-script-console/32889/3 "2025-06-16T11:04:03Z")

</div>

I haven’t used the script console before and i’m reading up on it now.

Do I just enter hudson.model.WorkspaceCleanupThread.disabled=true into the script console or need to create a script with extra bits? I`m guessing this is temporary until i set it as a java command at startup?

---

<div class="post-metadata">

**Author:** ![mawinter69](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/mawinter69/32/1625_2.png) [@mawinter69](https://community.jenkins.io/u/mawinter69)\
**Post date:** [June 16, 2025, 11:22am UTC](https://community.jenkins.io/t/setting-system-parameters-via-script-console/32889/4 "2025-06-16T11:22:00Z")

</div>

Just execute

```auto
hudson.model.WorkspaceCleanupThread.disabled=true

```

This will last until Jenkins is restarted.  
To have that permanent either add exactly this line to an [init script](https://www.jenkins.io/doc/book/managing/groovy-hook-scripts/#post-initialization-script-init-hook)  
or set a java property for the java command

```auto
java -Dhudson.model.WorkspaceCleanupThread.disabled=true ... -jar jenkins.war ...

```

---

<div class="post-metadata">

**Author:** ![jumpingkangaroo](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jumpingkangaroo](https://community.jenkins.io/u/jumpingkangaroo)\
**Post date:** [June 16, 2025, 11:31am UTC](https://community.jenkins.io/t/setting-system-parameters-via-script-console/32889/5 "2025-06-16T11:31:06Z")

</div>

Perfect. Thanks very much for your help.
