Shift Scheduler Blog
How to Use Scheduling Rules in Shift Scheduler

Scheduling rules are the instructions that tell Shift Scheduler how your roster should be built.
They turn real staffing policies into guidance for AI scheduling: who can work, who should avoid certain shifts, how rest should work, and which requirements are more important than others.
The short version:
- Write rules in plain language.
- Use High, Medium, or Low importance for preferences and goals.
- Use Must rules only for requirements that cannot be broken.
- Disable a rule when you want to keep it without applying it.
- If the roster does not match your expectation, adjust importance or add more specific rules.
What Scheduling Rules Are
Scheduling rules are saved roster rules for your workspace.
They help the scheduler understand constraints such as:
- Maximum consecutive work days
- Rest after difficult shifts
- Person-specific availability
- Skill or staffing requirements
- Limits on weekly or daily hours
In staff scheduling, every roster is a tradeoff. A manager may want full coverage, low overtime, employee preferences, legal rest, and a stable rotation at the same time. Sometimes all of these goals fit together. Sometimes they conflict.
Scheduling rules tell the AI scheduling system which goals matter and how strongly they should influence the result.
How To Define A Rule In Plain Language
You do not need to write formulas or configure numeric penalties manually.
Use simple sentences that describe what should happen in the roster. Good shift scheduling rules usually answer at least one of these questions:
- Who does the rule apply to?
- Which shift, day, location, or situation does it describe?
- Is it a preference or a strict requirement?
- What should the scheduler do when the rule applies?
Examples:
Nobody should work more than 5 consecutive days.After a night shift, give the person at least one day off.Do not schedule junior staff on closing shifts.Keep each person under 40 hours per week.Marta should have no more than 2 T shifts per week.
These rules are clear because they describe a real scheduling behavior. The scheduler can use them to compare possible rosters.
You can cap one or more named shift types per person by calendar week (Monday-Sunday) or calendar month. If a rule names several shift types, they share one combined cap. Regular matching shifts count across all locations, including existing shifts elsewhere in the same week or month; Time Off and custom shifts do not count. A Must cap is strict, while High, Medium, or Low adds its penalty once for every shift above the cap.
Rule Importance And Disabled Rules
Every Scheduling rule has one of five importance settings.
| Importance | Best use | How it behaves |
|---|---|---|
| Must | Legal requirements, safety requirements, true business blockers | Hard constraint. Use wisely: conflicting Must rules can make a feasible schedule impossible. |
| High | Strong preferences and goals | Adds 6000 points for each violation. |
| Medium | Meaningful preferences and goals | Adds 4000 points for each violation. |
| Low | Flexible preferences and goals | Adds 2000 points for each violation. New manually added rules start here. |
| Do not enforce rule | Rules you want to keep for later | Adds 0 points and is excluded from interpretation, scheduling, scoring, and violation diagnostics. |
Most roster rules should start at Low and be raised only when they need to compete more strongly with other soft goals.
High, Medium, and Low rules are appropriate for preferences such as "prefer mornings" or "avoid too many late shifts". These goals matter, but they may need to bend when coverage is tight.
Must rules should be reserved for requirements that are not optional. Examples include legal rest rules, safety requirements, required skills, or rules where breaking the rule would make the roster unacceptable.
This behavior is the same for the main rule types the scheduler can enforce: rest after a shift, maximum hours, location eligibility, unavailable dates, cannot-work-with rules, must-work-with rules, blocked shifts, rotations, weekly alternating patterns, maximum consecutive days, and a monthly minimum of weekends off. Active High, Medium, and Low rules add their selected penalty when broken. Must is hard. Disabled rules remain visible, editable, deletable, and reorderable, but do not affect scheduling.
If too many rules are marked as Must rules, the schedule can become impossible to fill. A strict set of hard constraints may leave open shifts unassigned because the scheduler is not allowed to break any of them.
Rule Order Is Visual Only
Drag rules into any order that makes the list easier for you to read and manage.
Reordering does not change importance, penalties, constraints, or solver results. Must and disabled rules can be placed anywhere, and changing a rule's importance never moves its card.
You control scheduling strength with the importance select, not by moving the card.
What Makes A Good Scheduling Rule
A good scheduling rule is specific, testable, and realistic.
Use this checklist:
- One rule should describe one scheduling idea.
- Mention the person, group, shift type, location, or date when it matters.
- Use numbers when the limit is numeric.
- Use Must rule only when breaking the rule is unacceptable.
- Avoid vague words when a clearer limit is possible.
Good rules help the scheduler make the same kind of decision a manager would make.
Weak rules make the system guess.
Weak Rules Rewritten As Good Rules
| Weak rule | Better rule |
|---|---|
Do not overwork people. | Nobody should work more than 5 consecutive days. |
Nights are hard. | After a night shift, give the person at least one day off. |
Keep hours normal. | Try to keep each person under 40 hours per week. |
Do not put new people in bad shifts. | Do not schedule junior staff alone on closing shifts. |
Good Rules For Common Scheduling Problems
Rest And Fatigue
Use these rules when the roster should protect recovery time:
After a night shift, give the person at least one day off.Nobody should work more than 5 consecutive days.One person can't work more than 12 hours per day
Rest rules can be High, Medium, Low, or Must. A soft rest rule adds its selected penalty when broken, so the scheduler can still fill a shift if coverage is tight. A Must rest rule is hard and should be used when the rest period represents law, safety, or a non-negotiable policy.
Use an explicit number of days. "Two days off after a night shift" is stored as rest.days: 2, which means both calendar dates D+1 and D+2 are kept free after a matching shift on D. The saved interpretation shown beside the rule should contain the same number as the rule text.
Fairness Is Automatic, But Allocation Fairness Can Be A Rule
Do not add broad total-hour fairness rules such as:
Balance total hours across all available people.
This usually makes no difference as a Scheduling rule. Shift Scheduler already tries to make the roster fair automatically by balancing total hours across available people and balancing shift-template mix when people can work the same templates.
If you need every person to reach an exact number of hours for the month instead of a relative balance, for example a part-time contract of 7.5 hours per business day, that is not a Scheduling rule either. State the target when you ask the AI assistant to build or update the schedule, and the scheduler can add extra shifts above your required open-slot coverage to reach it, without breaking Must rules. See how to schedule an exact number of hours per month for details.
You can, however, add allocation fairness for a specific set of days in the week. Use this when the problem is not total hours, but who receives work on certain days.
Examples:
Make weekend allocation fair.This balances Saturday and Sunday work.Make Friday, Saturday, Sunday allocation fair.This balances work across Friday, Saturday, and Sunday.Make allocation throughout the week fair.This balances work across Monday through Sunday.
Allocation fairness uses worked hours, not just shift count. Its strength follows the selected importance: High, Medium, and Low use 6000, 4000, and 2000 points per hour of allocation deviation. Must requires exact equality.
An exact free-weekend quota is also supported directly. For example, use Everybody needs at least 2 weekends off per month. A complete weekend is Saturday and Sunday with no regular work shift on either day; Time Off does not count as work. A weekend belongs to the calendar month containing its Saturday, and the scheduler checks that full month even when you generate only part of it. Use allocation fairness when you want weekend work spread evenly, and use the monthly weekends-off rule when each person needs a specific minimum.
Coverage And Skills
Use these rules when a shift requires a certain person type:
Every night shift must include at least one senior employee.Do not schedule junior staff alone on closing shifts.Each weekend shift should include at least one person trained for cash handling.
Skill and safety requirements are often good Must rules. Softer staffing preferences can use High, Medium, or Low.
What To Do When The Roster Is Not What You Expected
If the generated roster does not match your expectation, do not assume the scheduler ignored you. Usually the rule set needs more detail, different importance, or fewer hard constraints.
Try these steps:
- Raise the importance of rules that should have more influence.
- Lower the importance of preferences that should bend more easily.
- Add a missing rule that explains the expectation.
- Split a broad rule into smaller, clearer rules.
- Rewrite vague rules with concrete limits, people, shift types, or dates.
- Mark only truly non-negotiable requirements as Must rules.
- Check whether there are enough available people to satisfy the rules.
For example, if weekends are not distributed the way you expected, add a specific allocation fairness rule:
Make weekend allocation fair.
If the issue is Friday through Sunday, use:
Make Friday, Saturday, Sunday allocation fair.
Also check whether the right people are available for those days, whether dislikes/preferences are set correctly, and whether you need a concrete rotation or staffing rule.
If someone works too many difficult shifts in a row, add a rule like:
Nobody should work more than 5 consecutive days.
If the scheduler assigns someone after a night shift and that should not happen, add or mark as Must:
After a night shift, give the person at least one day off.
The best workflow is iterative. Generate a roster, review the result, adjust Scheduling rules, then generate again.
Importance Example
Imagine you care about rest, a concrete night-shift rotation, and Anna's morning preference.
These settings say rest matters most:
- High:
Nobody should work more than 5 consecutive days. - Medium:
Follow a day shift, night shift, two days off rotation. - Low:
Prefer Anna on morning shifts when possible.
These settings say Anna's preference matters more than the rotation pattern:
- High:
Nobody should work more than 5 consecutive days. - Medium:
Prefer Anna on morning shifts when possible. - Low:
Follow a day shift, night shift, two days off rotation.
Both are valid. The better importance mix depends on what you expect from the roster.
If your roster looks technically correct but feels wrong, rule importance is one of the first things to adjust.
FAQ
What are Scheduling rules in ShiftScheduler.ai?
Scheduling rules are saved instructions that guide AI scheduling and staff scheduling decisions. They describe roster rules such as rest limits, preferred shifts, skill requirements, rotation patterns, and other constraints.
Are High, Medium, and Low rules the same as Must rules?
No. High, Medium, and Low are soft rules with explicit penalties. The scheduler tries to satisfy them, but it can trade them off. Must rules are hard constraints and should be used only for requirements that cannot be broken.
Why does the order of rules matter?
It does not affect scheduling. Order is only for visually organizing your rule list. Use the importance select to control scheduling strength.
Do I need to set numeric penalties?
No. Choose High, Medium, or Low and Shift Scheduler applies 6000, 4000, or 2000 points automatically. The numeric table below documents the internal solver scores.
Should I add a rule to balance hours or spread weekends fairly?
Do not add a broad total-hours rule. Shift Scheduler already balances total hours automatically, and a rule like Balance total hours across all available people usually does not change the generated roster. If you want fairness over a specific part of the week, use allocation fairness, for example Make weekend allocation fair, Make Friday, Saturday, Sunday allocation fair, or Make allocation throughout the week fair. If every person needs a guaranteed minimum instead, use a direct quota such as Everybody needs at least 2 weekends off per month. If every person needs an exact number of hours for the month, that is not a Scheduling rule either; state the target when you run Auto Schedule instead, as described below.
Can I set an exact number of hours per person per month?
Yes. This is not a Scheduling rule, so you will not find it in the rule list. Instead, state the target when you ask the AI assistant to build or update the schedule, for example Schedule August so everyone works 7.5 hours per business day, or give a default plus named exceptions. The scheduler adds extra shifts above your required open-slot coverage to reach it, without breaking Must rules. See how to schedule an exact number of hours per month for the full explanation.
What should I do if the roster is wrong?
Adjust the Scheduling rules. Change importance, add missing rules, make vague rules more specific, split broad rules into smaller rules, and use Must rules only for non-negotiable requirements.
What are good shift scheduling rules?
Good shift scheduling rules are specific, realistic, and easy to evaluate. A good rule says who it applies to, when it applies, and what outcome is preferred or required.
Final Advice
Start simple.
Add the rules that matter most, keep most of them at Low or Medium importance, and reserve Must for true hard constraints. Then review the generated roster.
If the roster does not match your expectation, adjust importance or add more specific Scheduling rules. AI scheduling works best when your rules describe the real tradeoffs of your workplace.
Detailed Numeric Penalty Reference
Shift Scheduler uses numeric penalties and bonuses internally. A positive number makes a roster worse. A negative number is a bonus that makes a roster better. Users choose soft-rule penalties through importance and influence other values through availability, preferences, and shift setup.
| Solver item | Internal value | What it means |
|---|---|---|
| Unassigned shift | +30000 reported penalty per unfilled shift | The roster is penalized when an open shift remains unassigned. Coverage also has the strongest objective priority, so filling shifts is treated as the first major goal. |
| High-importance rule violation | +6000 per soft rule violation | Strong soft-rule priority. Applies to active soft rest, hour, location, availability, relationship, blocked-shift, rotation, weekly alternating, max-consecutive, and monthly-weekends-off rules. |
| Medium-importance rule violation | +4000 per soft rule violation | Medium soft-rule priority. |
| Low-importance rule violation | +2000 per soft rule violation | Flexible soft-rule priority and the default for manually added rules. |
| Must rule | No numeric penalty | Treated as a hard constraint. The scheduler should not break it; if too many Must rules conflict, shifts may remain unassigned. |
| Disabled rule | 0 | Kept in the rule list but omitted from interpretation, compilation, solver input, scoring, and diagnostics. |
| Disliked date preference | +1000 per assigned shift on that disliked date | Used when a person dislikes an entire date. |
| Liked date preference | -1000 per assigned shift on that preferred date | Used when a person likes an entire date. |
| Shift-specific disliked preference | +1000 per matching assigned shift | Used when a person dislikes a specific shift template on a date. |
| Shift-specific liked preference | -1000 per matching assigned shift | Used when a person likes a specific shift template on a date. |
| Total-hour fairness | sum absolute hour deviation in centihours * 1000 + max deviation in centihours | Roughly +100000 reported penalty per 1 hour of summed target deviation, plus +100 per 1 hour of max person deviation. |
| Template-mix fairness | +1 per centihour of template-mix deviation | Roughly +100 reported penalty per 1 hour of shift-template mix deviation. |
| Allocation fairness | Parent importance penalty per hour of allocation deviation | High/Medium/Low use roughly +6000, +4000, or +2000 per 1 hour of deviation inside the requested weekday/date group; Must requires exact equality. |
The reported penalty summary groups these into unfilled, fairness, preference, and pattern buckets. The pattern bucket includes soft Scheduling rule violations, including soft constraints such as rest, max hours, location eligibility, and cannot-work-with rules.
The optimizer compares rosters lexicographically:
- It first minimizes the number of unfilled shifts. A roster with better coverage wins before any fairness, preference, or soft-rule score is compared.
- Among rosters with the same best coverage, it minimizes exactly the reported total:
unfilled + fairness + preference + pattern.
There are no additional hidden multipliers on total-hour fairness, template-mix fairness, or any other reported category. At equal coverage, the roster with the lower reported total is better. Visual rule order does not affect that total.