Made sure the update for setting the program is done before scheduling a new one