Why does the simulator re-run my script every X seconds?