There is no time limit but there is a limit on the number of steps a script can use. As your script keeps looping round with busy messages and MOH it keeps running up its step count.
In appadmin System/System Parameters
The setting is: Max Number of Executed Steps*
The default is 1000, this is to prevent loops in a script from pulling down the system.
You should be able to increase this to 5000 without any problems.
Graham