# Add a rest within a loop, that will be used after 10 trials

**URL:** <https://discourse.psychopy.org/t/add-a-rest-within-a-loop-that-will-be-used-after-10-trials/38857>\
**Category:** Builder\
**Created:** [February 28, 2024, 10:17am UTC](https://discourse.psychopy.org/t/add-a-rest-within-a-loop-that-will-be-used-after-10-trials/38857 "2024-02-28T10:17:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![David\_Maitland](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/david_maitland/32/40280_2.png) [@David\_Maitland](https://discourse.psychopy.org/u/David_Maitland)\
**Post date:** [February 28, 2024, 10:59am UTC](https://discourse.psychopy.org/t/add-a-rest-within-a-loop-that-will-be-used-after-10-trials/38857/2 "2024-02-28T10:59:18Z")

</div>

If anyone is struggling, I found another thread which helped. Move the break routine within the loop, and create a code component, in the begin routine, input the code:

if name of loop.thisN == 0 or name of loop.thisN % 10 != 0:  
continueRoutine = False

The link to the thread is below:

[How to Pause a loop? - #21 by lauren001](https://discourse.psychopy.org/t/how-to-pause-a-loop/4906/21).

---

_[View the full topic](https://discourse.psychopy.org/t/add-a-rest-within-a-loop-that-will-be-used-after-10-trials/38857)._
