Run External Process(cmd) in parallel to Simulation execution

Hello
I need a way to run a .bat file with intervals during the simulation execution

I’m using Scenario Builder to run the execution

`

package scn_light

import io.gatling.core.Predef._
import io.gatling.core.structure.ScenarioBuilder
import io.gatling.http.Predef._
import io.gatling.http.protocol.HttpProtocolBuilder

class LoadSimulation extends Simulation {

val httpProtocol: HttpProtocolBuilder = http
.acceptHeader(“text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3”)
.acceptEncodingHeader(“gzip, deflate, br”)
.acceptLanguageHeader(“en-GB,en;q=0.9”)
.proxy(Proxy(“localhost”,8888).httpsPort(8888))
.disableCaching

val amazonSimulation = ScenarioBuilder(“Amazon”)
.exec(amazon.homepage)
.inject(constantConcurrentUsers(1) during (120))
.protocols(httpProtocol)

val appleSimulation = ScenarioBuilder(“Apple”)
.exec(apple.homepage)
.inject(constantConcurrentUsers(1) during (120))
.protocols(httpProtocol)

setUp(List(amazonSimulation,appleSimulation))

}

`

I tried to execute by the below method, but it executes the .bat file first and then goes for the simulation

`
package scn_light

import sys.process._

class lightSimulation {

var th = new Thread()
start()

class myThread extends Thread {
override def run() {
Process(“H:\light_scala.bat”)!
}
}

def start() : Unit = {
for(i ← 0 to 10) {
th = new Thread(new myThread())
th.start()
Thread.sleep(30000)
}
}

}
`

is there a way to do this? if so, pls let explain in detail on how to do it
I’m running Gatling 3.0 in a Windows 7 platform

Thanks

Any help on this would be grateful, at least I would need to know the feasibility of this query

Thanks