Cleaning up the script scheduler