1

I want to abort my Jenkins Job before clock hits a particular time. I didn't find anything which stops it automatically at a specified time(I don't want to do it manually). Is there anything like that?

I have read this post, but none of the answer solves my problem How to stop an unstoppable zombie job on Jenkins without restarting the server?

1 Answers1

2

If you want to stop a long running job, let's say, it is running more than 3 hours, then below jenkins plugins does exactly that for you.

Abort a build if it is likely stuck

Or, if you want certain build to abort on a specific time (i.e, no build should run at 5 pm daily), then you can configure groovy script to do that.

Pang
  • 9,564
  • 146
  • 81
  • 122
prudviraj
  • 3,634
  • 2
  • 16
  • 22
  • Thanks @prudviraj for your answer. How can I go about configuring groovy script to abort a running job, lets say, at 8 pm? – user1939089 Apr 09 '18 at 06:00