I want to make just 1 api call every 5 minutes. How can I achieve this using gatling?

I have a API call which has to run only once in every 5 minutes. How can I achieve this using Gatling?

I tried playing around with pauses. But was not able to achieve it.

You can make use of ‘pace’ to control the rate in this case.

for example, following scenario will run for 60 minutes and execute the block once every 5 minutes

val workload = scenario(“Workload”)
.during(60 minutes){
pace(15 minutes)
.exitBlockOnFail {
feed(requestIdFeeder)

.group(“Request1”) {exec(Request1)}

I tried this but the APi call does not pause nor makes only 1 api call.

I hava a scenario class:

object ConsumerApi {
  //Defines the Consumer API call
  val PostConsumerApi = http("Consumer API")
    .post("http://abc.abc.com/v1/execute")
    .headers(Headers.applicationJson)
    .check(status is 200)

  val RunConsumer = scenario("Run the Consumer")
      .pace(5 minutes)
      .exitBlockOnFail {
        exec(PostConsumerApi)
      }
}

Then I have the simulation class:

class TestFlow extends Simulation {

  val httpConfTest = http.baseURL(Environment.apiHost)

  val Scenarios = List(
    Flow1.Flow1
      .inject(constantUsersPerSec(10) during (30 minutes))  // Has to run for 30 minutes continuously.

https://stackoverflow.com/questions/39070726/use-of-pace-in-gatling-to-control-rate