AI is used in scheduling to decide how and when to schedule employees based on various factors. These factors can include the availability and performance history of each employee, as well as the demands of the job and customer satisfaction.