Anyway the issue with having an AI or just a regular old program doing things like that is that it will insist on following the rules. So you end up with tricky issues where the system WILL NOT revise the schedule 2 days in advance, because workers are required 7 days notice for instance. Or it can not fill a shift, because there are no one left it can legally call upon.
My wife works in a field that has less unemployment than IT, it is literally impossible to hire extra staff, there simply aren't any. These business also have legally mandate opening hours and a union (not a good one, but it's there). If more than one person call in sick, they technically have a problem, especially for evening shifts, where only one person is at work. You end up with situations where you're legally required to call someone to work, because you need to stay open. You just can't call anyone, because they are already at their maximum number of hours for that week (due to a lack of staff), or you the staff that is available aren't legally allowed to work for the next 11 hours, or the notice would be to short, or you're not able to schedule new off time quickly enough.
In the real world people ignore or bend rules to make things work. Computers don't. The sad reality is that we're surrounded by rules and legislation that are constantly in conflict with each other. It's one of my concerns with self driving cars as well, but to a lesser extend. Some roads are just over used, and with no alternatives, to a point where an AI that insist on keeping a safe distance would reveal that our infrastructure is very poorly laid out. It's just that human brains know and understand how to bend rules to make society work.