Skip to main content

Rules

What rules are, how visibility and priority work, and every rule type at a glance.


Rules are the scheduling policies that guide how schedules are generated. YouShift uses these rules as active scheduling intelligence, checking assignments against your requirements as you build a schedule and flagging when an assignment doesn't meet a rule. This gives you immediate feedback without having to remember every requirement yourself.
​

Rules also guide the Auto-Scheduler as it determines which assignments are allowed and identifies the best fit for each shift based on your requirements and rule priorities.
​

Well-configured rules help create schedules that are fair, compliant, and efficient, with fewer manual fixes. For step-by-step setup, see Building rules.

Rule types

Rules are organized into five categories:

How much someone works

Rules that cap or guarantee how much work someone takes on.

Rule

What it does

Example

Monthly / weekly limit [link]

Caps or guarantees recurring work in a repeating window: weekly, monthly, or yearly.

No more than 40 hours a week, 3 night shifts a month, or 100 shifts a year.

Rest & recovery

Rules that protect rest between shifts.

Rule

What it does

Example

Rest after demanding shifts [link]

After someone works a shift you choose, blocks other shifts for a set time.

After a night shift, no shifts for 24 hours.

Protected rest [link]

Guarantees complete blocks of time off within a repeating period. Needs a rest period type first.

Two golden weekends a month.

Shifts once a streak is reached [link]

Blocks shifts as soon as someone works a set number of days in a row, even if the run continues.

After 3 days in a row, no more shifts for the next 48 hours.

Rest once a streak ends [link]

Waits for a run to end, then keeps whole days clear.

After 2 or more nights in a row, the next 3 days are clear.

Where someone can work

Rules that decide which shifts someone is eligible for.

Rule

What it does

Example

Can't work these shifts [link]

Keeps specific people off certain shifts, days, or sections.

Dr. López never works weekends.

Can only work these shifts [link]

Restricts someone to a specific set of shifts.

Dr. García can only be assigned night shifts.

Shift patterns

Rules that shape how shifts follow one another or pin them to a person.

Rule

What it does

Example

Days in a row [link]

Sets the minimum and maximum consecutive working days.

Runs of 2 to 4 days in a row.

Shifts that go together [link]

Links shifts so the same person works both.

Whoever works Friday night also works Saturday night.

Fixed recurring assignment [link]

Locks a person into a shift that repeats every scheduling period.

Dr. A always works Monday evenings.

Rotation [link]

A repeating on/off pattern where blocks of providers take turns.

A hospitalist works 7 days on, then 7 days off.

Who works together

Rules about who shares a shift, and how many.

Rule

What it does

Example

Keep groups apart [link]

Stops two groups from sharing a shift.

Senior and junior residents never overlap.

Team composition per shift [link]

Controls how many people from a group can, or must, be on a shift.

At least 1 attending on call, at most 2 residents at night.

Tip: If a need touches more than one category, split it into separate rules. "Dr. Park works 6 shifts a month in OR-2, at least 2 in the evening, never on Mondays" becomes three rules, one per category.

Rule visibility

Visibility controls what each user sees about a rule in the Member Portal. It doesn't change how the rule is applied.

Visibility

Icon

What the user sees

Hidden

Gray crossed eye

Nothing. The rule still applies.

Visible

Orange eye

The rule's name only, such as "Total nights per month".

Visible with requirements

Blue eye

The rule and its values, such as "Maximum: 3 nights per month".

User input enabled

Green speech bubble

The rule, plus fields to enter their own minimum and maximum.

Visibility is set per user.

Priority

Priority tells the scheduling engine how strictly to enforce a rule. When rules conflict, the higher priority wins. Most rules set it per user; some set it separately for the minimum and the maximum.

Priority

Level

10

Mandatory

8

Extremely important

6

Very important

4

Quite important

2

Somewhat important

0

Not very important

—

Disabled

Use Mandatory or close to it for contractual or legal limits, and lower levels for preferences.

Best practices

  • Make expressions only as broad as needed, and check the matching shifts before saving.

  • Use labels instead of listing shifts one by one. Create as many as you need.

  • Split complex requirements into several simple rules.

  • Check that rules don't contradict each other. For example, a fixed recurring assignment on a shift that a Can't work these shifts rule blocks makes a valid schedule impossible.

Did this answer your question?