Skip to content

Overtime only after scheduled hours

The rule

Each person has a schedule. Time worked past the day’s scheduled hours is overtime, whatever the length of the shift: past 8 hours on an 8-hour day, past 4 on a day shortened to 4, past 10 on a 10-hour shift. Work on a day with no shift at all is either all overtime (the person was called in on a day off) or all regular (part-timers picking up a day), as the policy says.

Who uses it

Employers under collective agreements that pay overtime “outside the scheduled shift”, public-sector employers, and companies whose part-time and flexible schedules make a fixed daily threshold wrong for everyone.

How the recipe does it

Configuration only: a package (package.toml) of one policy layer with the standard after_schedule step, on each workday.

[[layer]]
id = "after-schedule"
[[layer.step]]
id = "after_schedule"
uses = "standard/after_schedule"
params = { to = "overtime", unscheduled = "overtime" }
  • The day’s scheduled time is the time of its shifts, as shift definitions and schedule overrides (a day taken off, a shift replaced, an extra shift) make them.
  • Worked time past it moves to to, the latest first.
  • On a day with no shift, unscheduled says whether all its work is overtime or none of it is. A tenant that counts those days as regular changes the one parameter in a layer of its own:
[[layer]]
id = "unscheduled-regular"
order = 10
[[layer.step]]
id = "after_schedule"
change = "params"
params = { unscheduled = "regular" }

A night shift is the schedule of the workday it starts in, as its work is.

Parameters

ParameterMeaning (default)
toThe overtime category ("overtime").
unscheduledOn a day with no shift: "overtime" (all its work, as the package sets it) or "regular" (none of it, the step’s default).

What the scenarios show

  • past-the-scheduled-time: exactly the schedule, a minute past it, a day whose shift an override shortened to 4 hours, and an unscheduled Saturday paid as overtime.
  • unscheduled-days-as-regular: the same choice the other way, and a night shift’s half hour past its end.

This is a common way companies implement overtime after scheduled hours; check the rules where you operate. A statutory daily or weekly overtime rule may still apply on top of it; add the matching standard/threshold step after this one, counting only regular time.

Get the recipe

The recipe’s package and its scenarios are in the example packages repository: attendance/overtime_after_schedule. Test it, or your own copy of it, with hourctl attend test, and publish it with hourctl attend pkg publish.

The policy package

The package’s layers, with the standard steps each one runs and their settings:

overtime_after_schedule/package.toml
name = "overtime_after_schedule"
version = "1.0.0"
description = "Time worked past the day's scheduled shift is overtime; work on a day with no shift is overtime too."
# Worked time past the day's scheduled time is overtime; a day with no
# shift (called in on a day off) is all overtime.
[[layer]]
id = "after-schedule"
[[layer.step]]
id = "after_schedule"
uses = "standard/after_schedule"
params = { to = "overtime", unscheduled = "overtime" }

Scenarios

Each scenario gives a person’s punches and setup and the timecard they must produce, worked out with this package adopted (the format).

Scheduled 08:00 to 16:00 on weekdays. Monday's 8 hours are exactly the schedule: no overtime. Tuesday's 8 hours and a minute: a minute. Wednesday's shift was changed to 08:00 to 12:00, so of 8 hours worked 4 are overtime. Saturday has no shift: all 4 hours are overtime
scenarios/past-the-scheduled-time.toml
description = "Scheduled 08:00 to 16:00 on weekdays. Monday's 8 hours are exactly the schedule: no overtime. Tuesday's 8 hours and a minute: a minute. Wednesday's shift was changed to 08:00 to 12:00, so of 8 hours worked 4 are overtime. Saturday has no shift: all 4 hours are overtime"
punch = [
{ at = "2026-10-05 08:00", kind = "in" }, { at = "2026-10-05 16:00", kind = "out" },
{ at = "2026-10-06 08:00", kind = "in" }, { at = "2026-10-06 16:01", kind = "out" },
{ at = "2026-10-07 08:00", kind = "in" }, { at = "2026-10-07 16:00", kind = "out" },
{ at = "2026-10-10 08:00", kind = "in" }, { at = "2026-10-10 12:00", kind = "out" },
]
[policy]
zone = "America/Chicago"
[[shift_definition]]
id = "days"
start = "08:00"
end = "16:00"
days = ["monday", "tuesday", "wednesday", "thursday", "friday"]
[[schedule_override]]
date = "2026-10-07"
kind = "replace"
start = "08:00"
end = "12:00"
recorded = "2026-10-01 09:00"
[expect]
week = "2026-10-05"
worked = "28h 1m"
allocations = [
"2026-10-05 08:00-16:00 work 8.00",
"2026-10-06 08:00-16:00 work 8.00",
"2026-10-06 16:00-16:01 overtime 0.01",
"2026-10-07 08:00-12:00 work 4.00",
"2026-10-07 12:00-16:00 overtime 4.00",
"2026-10-10 08:00-12:00 overtime 4.00",
]
With unscheduled = regular, Saturday's unscheduled 4 hours stay regular, while Friday's hour past its shift is still overtime. A night shift of 22:00 to 06:00 is one workday's schedule: worked to 06:30, its last half hour is overtime
scenarios/unscheduled-days-as-regular.toml
description = "With unscheduled = regular, Saturday's unscheduled 4 hours stay regular, while Friday's hour past its shift is still overtime. A night shift of 22:00 to 06:00 is one workday's schedule: worked to 06:30, its last half hour is overtime"
punch = [
{ at = "2026-10-09 08:00", kind = "in" }, { at = "2026-10-09 17:00", kind = "out" },
{ at = "2026-10-10 08:00", kind = "in" }, { at = "2026-10-10 12:00", kind = "out" },
{ at = "2026-10-11 22:00", kind = "in" }, { at = "2026-10-12 06:30", kind = "out" },
]
[policy]
zone = "America/Chicago"
# The tenant's own choice: a day with no shift is regular time.
[[layer]]
id = "unscheduled-regular"
order = 10
[[layer.step]]
id = "after_schedule"
change = "params"
params = { unscheduled = "regular" }
[[shift_definition]]
id = "days"
start = "08:00"
end = "16:00"
days = ["friday"]
[[shift_definition]]
id = "nights"
start = "22:00"
end = "06:00"
days = ["sunday"]
[expect]
week = "2026-10-05"
allocations = [
"2026-10-09 08:00-16:00 work 8.00",
"2026-10-09 16:00-17:00 overtime 1.00",
"2026-10-10 08:00-12:00 work 4.00",
"2026-10-11 22:00-2026-10-12 06:00 work 8.00",
"2026-10-12 06:00-06:30 overtime 0.50",
]