# postman.setNextRequest(null) is not stopping runner(solved - user error)

**URL:** <https://community.postman.com/t/postman-setnextrequest-null-is-not-stopping-runner-solved-user-error/32241>\
**Category:** Help Hub\
**Tags:** collections\
**Created:** [February 4, 2022, 4:03pm UTC](https://community.postman.com/t/postman-setnextrequest-null-is-not-stopping-runner-solved-user-error/32241 "2022-02-04T16:03:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandoyle](https://avatars.discourse-cdn.com/v4/letter/d/eb9ed0/32.png) [@dandoyle](https://community.postman.com/u/dandoyle)\
**Post date:** [February 4, 2022, 4:03pm UTC](https://community.postman.com/t/postman-setnextrequest-null-is-not-stopping-runner-solved-user-error/32241/1 "2022-02-04T16:03:00Z")

</div>

Link to public collection to run the demo: [https://www.getpostman.com/collections/2478d8a33af312c37da6](https://www.getpostman.com/collections/2478d8a33af312c37da6)

_My question_: how to stop runner if the runner stops in the middle of a set of requests?

_Details (like screenshots)_:  
The script found in the Demo Setup request creates a closure with an array of jobs that are enabled or disabled. Requests are in this order in the collection: Setup Job, First Request, Second Request, Third Request.  
Current demo is setup to run the Setup Job then Second Request and then stop using postman.setNextRequest(null).

This is the output:

_How I found the problem_: when I run the setup above, it is observed that these requests run: Setup Job, Second Request, Third Request. Third Request is not supposed to run because it is disabled. In this case, runNext does skip the Third Request but for some reason the runner keeps on executing.

_I’ve already tried_: not sure if there is a problem in my script but according to the output, postman.setNextRequest(null) is called after Second Request. I am not aware of other things to try but the expectation is that the run should end if postman.setNextRequest(null) is set.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [April 3, 2025, 3:04pm UTC](https://community.postman.com/t/postman-setnextrequest-null-is-not-stopping-runner-solved-user-error/32241/2 "2025-04-03T15:04:59Z")

</div>

Closed on April 3, 2025, 3:04pm UTC


