Unify schedule_script() and schedule_script_now() to give bugs less code paths to hide in.