What would happen in this scenario?

Hello. I have a loop scenario that is triggered every 4 minutes by a Cron module.

Every 4 minutes, I need to get a new API key from one of the services our app is using. In the past, we had an issue where this service was down, and our old system had no loop, so once it failed, everything stopped from working, and more critical from trying to get a new key.

I have built a scenario where it gets the key and checks if the key is valid. Otherwise, it will repeat the scenario until the key is ok.

Someday the external service could be down, so the GET KEY (HTTP module) would fail, and then an infinite loop would start until the server would be up again, and the scenario would be completed.

As this scenario runs automatically every 4 minutes, what would happen if the loop is running and pass 4 minutes? A separated execution/scenario would start and loop too? Because if the answer is yes, then at some point, this eventually will kill the CPU.

Or when a scenario is running, a new one doesn’t start until this one is “completed”?


There is no hard limit to the number of execution that could run at a time.

So if your first execution ends up in a continuous loop for more than 4 minutes, a second execution is triggered and would run in parallel, like so:

To prevent this, you might want to set a timeout in your workflow settings:

So it would be good to have a timeout at 3:50, as this complete scenario would rerun every 4 minutes, right?

Thanks for the quick answer @MutedJam!

1 Like

Yes, sounds like a sensible approach to me :slight_smile:

1 Like

Thank you!

1 Like