joe huang
joe huang

Reputation: 59

How to restart Jenkins automatically after it crashes or closes?

I am finding a way to restart jenkins service automatically after it fails or crashes, I want to know that is there any way to do it? Thanks.

Upvotes: 0

Views: 2085

Answers (1)

Robert Grądzki
Robert Grądzki

Reputation: 179

You can use bash scrip in crontab and periodically check:

service jenkins status #if installed as service

if return value other than correct value then:

service jenkins restart

But.. in my opinion You should try to find crashing reason. I use Jenkins for years and it never crashed..

Upvotes: 1

Related Questions