Shift Scheduler Blog
Doctor Rota Planning: Fixed Patterns and Fair Fridays
This is an anonymized case study of a real customer with a very specific set of requests for their rota planning. The goal is to serve as inspiration for you to think about setting rules for your workspace.
Their requests were the following:
- There are 6 doctors in total.
- There are 2 shifts: M — Morning (8 am–4 pm) and A — Afternoon (11 am–7 pm).
- Each doctor has a recurring Monday–Thursday pattern:
| Doctor | Monday | Tuesday | Wednesday | Thursday |
|---|---|---|---|---|
| Doctor 1 | A | A | M | M |
| Doctor 2 | M | A | A | M |
| Doctor 3 | A | M | A | M |
| Doctor 4 | A | M | M | A |
| Doctor 5 | M | M | A | A |
| Doctor 6 | M | A | M | A |
- Fridays are scheduled separately: 2 doctors in the afternoon, with a fair rotation over time. The remaining available doctors work Friday mornings.
- For most doctors, when they work a Friday afternoon, one of their weekday afternoon shifts should be converted to a morning shift to maintain an approximately balanced number of morning and afternoon shifts. Doctor 1 is the exception: Friday assignments should not alter her fixed Monday–Thursday pattern, although she also participates in Friday afternoons.
- There should always be a minimum of 2 doctors on the morning shift and 2 on the afternoon shift each working day for safe clinical coverage.
- Every person usually works every day of the week (Monday–Friday). Nobody wants Friday afternoons :)
Their goal: The overall goal is to keep a stable recurring base rota and automate Fridays, absences and exceptions with the minimum possible disruption. In case of absences or holidays, coverage should be reassigned while disrupting the other doctors’ established patterns as little as possible.
From the perspective of AI shift scheduling, this required a very specific setup of rules and a little bit of algorithmic thinking. If you need any help with setup, just email us at adam@shiftscheduler.ai, and we will be more than happy to help you with the setup. In this specific scenario, we used the following setup:
- In
/locations, we created 2 open slots for M morning shifts and 2 open slots for A afternoon shifts on each weekday.
AI rules:
- Every person can have at most one shift per day (Must importance).
- A maximum of 2 A shifts in total across the team should be scheduled on each Friday (Must importance).
- Allocate A shifts fairly on Fridays, so people have as close as possible to the same number of Friday A shifts over time (High importance).
- Doctor 2, Doctor 3, Doctor 4, Doctor 5 and Doctor 6 shouldn't have more than 2 A shifts each per week (High importance).
- Doctor 1 shouldn't work an A shift on Wednesday or Thursday (Must importance).
- Doctor 1 shouldn't work an M shift on Monday or Tuesday (Must importance).
- Doctor 2 shouldn't work an A shift on Monday or Thursday (Medium importance).
- Doctor 2 shouldn't work an M shift on Tuesday or Wednesday (Low importance).
- Doctor 3 shouldn't work an A shift on Tuesday or Thursday (Medium importance).
- Doctor 3 shouldn't work an M shift on Monday or Wednesday (Low importance).
- Doctor 4 shouldn’t work an A shift on Tuesday or Wednesday (Medium importance).
- Doctor 4 shouldn't work an M shift on Monday or Thursday (Low importance).
- Doctor 5 shouldn't work an A shift on Monday or Tuesday (Medium importance).
- Doctor 5 shouldn't work an M shift on Wednesday or Thursday (Medium importance).
- Doctor 6 shouldn’t work an A shift on Monday or Wednesday (Medium importance).
- Doctor 6 shouldn't work an M shift on Tuesday or Thursday (Low importance).
- Nobody should work on weekends (Must importance).
As you can see, it is more about setting boundaries — so instead of saying when people should work, it is more about saying when they shouldn’t work. This way, the algorithm receives a penalty for breaking a High, Medium or Low rule. Must rules are hard constraints and cannot be broken.
The weekly afternoon limit encourages the Friday compensation, while the weekday preferences keep changes close to the base pattern. The base pattern has 3 morning doctors and 3 afternoon doctors each Monday–Thursday. Converting one afternoon shift to a morning shift on a given day still leaves the required 2 afternoon doctors. When both Friday afternoon doctors need a weekday adjustment, those conversions should happen on different days to preserve coverage. Exact equality on Fridays is not always possible within a single month, so fairness is a goal over time.
We asked the AI agent to run AI scheduling. When asked, it was important to tell the AI agent how many hours these people were supposed to work per month, so scheduling would not only fill all open slots but also create extra shifts so everybody works Monday–Friday, except during absences or holidays. For these 8-hour shifts, that means 8 hours per working day, with targets adjusted for time off and any unpaid breaks.
See the screenshots below. In a month where nobody is on vacation and there are no special requests, everybody can follow the standard rotation, with the weekday adjustments needed to compensate for Friday afternoons and a fair allocation of Fridays. The second screenshot shows a rota plan with vacations and special requests from users. The system automatically balances fairness, and you can generate the schedule every month with a single click while taking users’ requests into account. If absences leave too few available doctors to meet the coverage requirements, some open slots will remain unfilled and the rota needs review.

