A main road in a York suburb is going to be closed during the day on weekdays for two weeks.