# Set a fail status to a timed out job

**URL:** <https://forum.buildkite.community/t/set-a-fail-status-to-a-timed-out-job/2916>\
**Category:** Pipelines\
**Created:** [May 12, 2023, 4:08pm UTC](https://forum.buildkite.community/t/set-a-fail-status-to-a-timed-out-job/2916 "2023-05-12T16:08:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![goncharov](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/goncharov/32/1245_2.png) [@goncharov](https://forum.buildkite.community/u/goncharov)\
**Post date:** [May 12, 2023, 4:08pm UTC](https://forum.buildkite.community/t/set-a-fail-status-to-a-timed-out-job/2916/1 "2023-05-12T16:08:24Z")

</div>

Hi! I have a job with `timeout_in_minutes` parameter set [Command step | Buildkite Documentation](https://buildkite.com/docs/pipelines/command-step#timeout_in_minutes)  
Sometimes it does timeouts but I don’t want developers to think that it is passed and would rather want to restart it.  
Is it possible to make a job exit with non-zero if it has timed out? Or I have to invent my own “time out” that will exit with 1?

---

<div class="post-metadata">

**Author:** ![stephanie.atte](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/stephanie.atte/32/1357_2.png) [@stephanie.atte](https://forum.buildkite.community/u/stephanie.atte)\
**Post date:** [May 12, 2023, 4:50pm UTC](https://forum.buildkite.community/t/set-a-fail-status-to-a-timed-out-job/2916/2 "2023-05-12T16:50:28Z")

</div>

Hey @goncharov

Thanks for reaching out!

Previously, the build would consider a timed out job as “failed”, regardless of its exit status. We made change to our system about 3 years ago, that if the job time out happens when the step is about to finish (pass) we return an exit status 0

Because the jobs can time out at the same exact moment that the job was completed and supposed to gracefully exit. However if the timeout is due to a Signal Interruption, then it would state that clearly in the logs. For your Build, if you increase the Timeout, it should work fine!

> **[Timed out jobs that exit with 0 will now pass](https://buildkite.com/changelog/85-timed-out-jobs-that-exit-with-0-will-now-pass)**
>
> Previously, the build would consider a timed out job as "failed", regardless of its exit status 🙃

Hope this helps !  
Cheers  
Stephanie
