Sorry I think I didn't explain myself correctly! You're right in saying that big on loops are bad, but I find the best way to manage that is to delegate script function to subclasses each with their own purpose, that way for larger and especially AIO scripts, your onLoop would be no more than 10 or 20 lines. For big scripts, breaking the code up is a must, I just don't think that a 'task' or 'node' (or whatever name you want to call it) framework is the best way and often there are much neater design patterns which fulfil a more object-oriented style! (:
Apa