<p>Jenkins jobs are not in interrupted if you run them on Jenkins agents and not a controller.</p>
<p>What you look for is <code>safeRestart</code> which:</p>
<blockquote>
<p>Puts Jenkins into the quiet mode, wait for existing builds to be
completed, and then restart Jenkins</p>
</blockquote>
<p>Read more <a href="https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-masters/how-to-start-stop-or-restart-your-instance" rel="nofollow noreferrer">here</a> and Jenkins docs.</p>

CC BY-SA 4.0
2023-03-03T00:48:55.157Z
I always wondered, what if my long-running job is executing on an agent and I restart the controller. Will the restarted controller pick up the long-running job continue showing log progress or not?
wowbagger
CC BY-SA 4.0
2023-01-26T16:03:42.313Z
2023-01-26T16:03:42.313Z
rokpoto.com
<p>There has a chance to restart Jenkins with stops the job or once job is completed. But is there any command or process to restart Jenkins without interrupt running job.</p>

<jenkins>
Jenkins restart without interrupting currently running jobs
yeswanth kumar
# Jenkins restart without interrupting currently running jobs

(Asked by: username_0 on 2023-01-26)

There has a chance to restart Jenkins with stops the job or once job is completed. But is there any command or process to restart Jenkins without interrupt running job.

**Tags:** jenkins


---

## 1 answers

### Answer by username_1 on 2023-01-26. Score: 1

Jenkins jobs are not in interrupted if you run them on Jenkins agents and not a controller.

What you look for is `safeRestart` which:

> Puts Jenkins into the quiet mode, wait for existing builds to be
> completed, and then restart Jenkins

Read more [here](https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-masters/how-to-start-stop-or-restart-your-instance) and Jenkins docs.

> **Comments:**
> **username_2**: I always wondered, what if my long-running job is executing on an agent and I restart the controller. Will the restarted controller pick up the long-running job continue showing log progress or not?  

---

