Is this for UCCX?
If so, the RSM script does loop a bit, and scripts have a maximum step execution of 1000 steps by default. While there's not real set time limit or a count of how many steps will execute in a specific time window, you could always just attempt to increase the max steps for your system under System Parameters. Or, you could roll your own RSM app, just by looking at how the system one works. To view the script, open the editor and go to File > New > Queuing > Remote Monitoring.