schedule planning logic