# using repeat within chained scenarios

**URL:** <https://community.gatling.io/t/using-repeat-within-chained-scenarios/431>\
**Category:** Gatling (Open-Source)\
**Created:** [June 13, 2013, 4:15pm UTC](https://community.gatling.io/t/using-repeat-within-chained-scenarios/431 "2013-06-13T16:15:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zique\_Sousa](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@Zique\_Sousa](https://community.gatling.io/u/Zique_Sousa)\
**Post date:** [June 13, 2013, 4:15pm UTC](https://community.gatling.io/t/using-repeat-within-chained-scenarios/431/1 "2013-06-13T16:15:03Z")

</div>

I have several methods that I want to use repeat. These methods span across two chained scenarios

In the example below, I only want to repeat the methods 1 - 4, but not 5.

val chain\_0 =  
.repeat(5,“X”) {  
.exec(http(“Stop 1”))  
.exec(http(“Stop 2”))  
.exec(http(“Stop 3”))

val chain\_1 =  
.exec(http(“Stop 4”))  
.exec(http(“Stop 5”))

}  
.exec(http(“Stop 6”))
