Fix schedule's end_time missing when there's error