Skip to main content
Rest constraints ensure employees have adequate recovery time between shifts, comply with labor regulations, and maintain work-life balance.

Rest Types

TypeDescription
Between shiftsMinimum idle time after a specific shift ends
Weekly restMinimum total rest during a defined period
Consecutive restMinimum uninterrupted rest period

Rest After Shift

Require minimum rest time after specific shift types. Triggered when a shift ends:
{
  "rests": [
    {
      "tags": ["NIGHT"],
      "sequence": "AFTER",
      "min": "PT15H"
    }
  ]
}
After any shift tagged NIGHT, the employee must have at least 15 hours before their next shift.

Multiple Rest Tolerances

Define tiered rest requirements:
{
  "rests": [
    {
      "tags": ["NIGHT"],
      "min": "PT15H",
      "frequency": 1
    },
    {
      "tags": ["NIGHT"],
      "min": "PT22H",
      "frequency": 1
    }
  ]
}

Weekly Rest

Ensure minimum total rest hours within a defined period:
{
  "rests": [
    {
      "period": {
        "from": "2024-01-01T00:00:00",
        "to": "2024-01-08T00:00:00"
      },
      "min": "PT35H"
    }
  ]
}
Employees get at least 35 hours of rest during the week of January 1-7.

Exclude Non-Work Shifts

Exclude certain shift types from rest calculations:
{
  "rests": [
    {
      "excludes": ["TRAINING", "MEETING"],
      "period": {
        "from": "2024-01-01T00:00:00",
        "to": "2024-01-08T00:00:00"
      },
      "min": "PT35H"
    }
  ]
}

Weekend Rest Window

Define a specific weekend rest window (e.g., Saturday night to Monday morning):
{
  "rests": [
    {
      "period": {
        "from": "2024-01-06T20:00:00",
        "to": "2024-01-08T08:00:00"
      },
      "min": "PT35H"
    }
  ]
}

Consecutive Rest

Require a minimum uninterrupted rest period:
{
  "rests": [
    {
      "periodType": "WEEKLY",
      "tags": ["ALL"],
      "min": "PT20H",
      "minConsecutive": "PT10H",
      "frequency": 3,
      "sequence": "AFTER"
    }
  ]
}
min
string (ISO 8601 duration)
Total minimum rest required (can be split)
minConsecutive
string (ISO 8601 duration)
Minimum uninterrupted rest block required
frequency
integer
Maximum number of rest occurrences to enforce

Rest Properties

tags
array
Shift tags that trigger this rest rule (e.g., ["NIGHT"])
excludes
array
Shift tags to exclude from rest calculations
sequence
string
When to apply: AFTER (default) or BEFORE
period
object
Fixed time period for weekly/periodic rest rules
periodType
string
Rolling period type: WEEKLY, DAILY

Common Rest Patterns

{
  "rests": [
    {
      "tags": ["ALL"],
      "sequence": "AFTER",
      "min": "PT11H"
    }
  ]
}
{
  "rests": [
    {
      "periodType": "WEEKLY",
      "min": "PT24H",
      "minConsecutive": "PT24H"
    }
  ]
}
{
  "rests": [
    {
      "tags": ["NIGHT"],
      "sequence": "AFTER",
      "min": "PT48H"
    }
  ]
}
Combine rest rules with patterns for comprehensive fatigue management. Rest rules handle timing, patterns handle shift sequences.