Improved timed rotator script.