Repeat Action Scheduler X number of times

I want a server connect to run every 3 seconds for 5 minutes and then stop. Is there a way to do this with the Action Scheduler? I know how to make it repeat every 3 seconds I just can’t figure out how to make it stop after 100 times or 5 minutes.

How about a While loop?

Sorry - should have mentioned I need this on the client side.

Could you use Ken’s method and just put the server connect in a page flow? Not sure, just thinking out loud. I think the flows have some repeat or looping functions.

Flows have while loops as well. Maybe you assign a variable at the start of the flow that represents the time when the flow should exit.