added check for schedule_mode