This script demonstrates reloading a script. So if you're running something in a loop, and want the ability to modify the code at runtime, this is your best bet.
I still have to figure out how to make it an annotation that you apply at the top of the script and have the whole script run in a loop.
<script src="https://gist.github.com/3145120.js?file=Foo.groovy"></script>