How Erlangly builds a schedule

A draft is made from your published forecasts, the shift patterns each line of business uses, and each person's lines of business, contract, binding availability and time off, within labour law. This page says how. Scheduling has the steps.

How a draft is made

Week by week, Erlangly plans each person's shifts against what the floor still needs:

StepWhat happens
Who goes firstThe least flexible: those on the fewest lines of business, then those with the most days to fill. The people with the fewest options get the shifts that suit them.
Each day's shiftThe best one from the shift patterns their lines of business use, or their pattern set's while they have one, within their binding availability and around their time off.
Which daysThe days that add the most coverage, up to their contract's days and maximum hours. Then it tops up to their minimum hours.
Other shiftsSomeone who works for another client too, or is already scheduled either side of the period, is planned around those shifts, with rest either side. Those hours and days come off the week they start in. See Several clients.
OverstaffingStaffing beyond the need counts against a shift, so people go where they're short rather than piling up where they're not.
BreaksPlaced in their windows where coverage needs them least.
ImprovingEach person's week is planned again against everyone else's, to close the gaps the first pass left.
Evening outLast, everyone's breaks are moved again, a person at a time, while that helps coverage. A move that would break a labour rule set as a violation isn't made: the draft says whose breaks stayed where they were placed, and why.

The whole draft is then checked against the labour rules. As it goes, generation keeps to rest, days in a row and hours where the law makes them binding: see When a draft is generated.

Contracts, availability and time off

WhatHow generation uses it
Contract hoursEach person's minimum and maximum hours a week, and their days a week. A blank figure uses the default for their employment type (below). A person's page shows which figures are defaults.
A contract's max a dayA hard limit, as binding availability is: no shift with more hours of work than the person's contract allows, where it sets a maximum; the lower of it and the law's wins. Someone whose max a day is under every shift their patterns make gets none, and the draft names them.
A contract's days off in a rowA hard limit: that many of the person's days off together each week, where their contract asks for it. 2 keeps a weekend-like pair. A run can carry on from the days off just before the week.
Binding availabilityA hard limit: nobody is scheduled outside it. It can run past midnight: Monday from 22:00 to 06:00 lets them work Monday night, until 06:00 on Tuesday.
Availability that isn't bindingA preference only: generation doesn't use it.
Approved time offShifts avoid it. A day wholly off still gets a shift, at the time of day it's least needed, with the time off over it. It covers nothing, so the week keeps the person's contract days, and their days off stay days off.

Shifts changed by hand aren't checked against a contract's max a day or days off in a row: the labour-law check goes by labour law's limits.

Employment typeDefault contract
Full time40 hours over 5 days
Part time16 to 25 hours over 4 days
TemporaryUp to 40 hours over 5 days

Changes during a week. Each day goes by that day's lines of business, hire date and contract, so a change mid-week counts from its day.

  • Someone hired on a Wednesday is scheduled from Wednesday.
  • Someone who moves from Billing to Tech support on a Wednesday works on Billing until Tuesday and on Tech support from Wednesday.
  • Someone who stops working on your lines of business, or whose schedule ends as they leave, has no shifts after their last day, and a shift on that day ends by midnight.
  • A week a new contract starts in is planned to both, by the days each is in force: 40 hours a week until Tuesday, then 20 from Wednesday, makes about 26 hours that week ((2 × 40 + 5 × 20) ÷ 7), and its days a week are worked out the same way, to the nearest day.
  • A week someone starts or leaves in keeps their contract's hours and days, as far as their days with you allow.

Night shifts

A pattern's shifts can run past midnight: 8 hours from 22:00 ends at 06:00 the next morning. A night shift belongs to the day it starts. It counts towards that day and that week for hours, days in a row and labour law, and it covers what's needed on both sides of midnight.

Shifts go by the clock, so on the nights the clocks change, 22:00 to 06:00 is 7 or 9 hours long. On the night they go forward, a lunch from 01:45 runs on to 03:15, and the next break starts when it ends.

  • The last night of a period is planned against the forecast for the day after it, so publish forecasts a day past your periods. Without one, the draft says so.
  • Nights from the schedules either side of a period count as people already on the phone, and rest holds around them. A period's coverage, its figures and Even out breaks… count the people still on from the period before's last night as well, on its first morning, and its figures are worked out again when that schedule changes.
  • A whole day off runs from midnight to midnight: the night before can't run into it, and no night starts on it unless the next day is off too. Then, like any day off, it gets a shift where it's least needed, under the time off, covering nothing. To give someone one night off, book it with times, like 22:00 to 06:00. Nor does a night run into a day nobody's needed, another client's shift, or the day after someone's last on your lines of business or a leaver's last.
  • For someone on another clock, labour law goes by theirs: a Sunday night that's already Monday where they are counts in their next week.
  • Binding availability can run to the next morning, like 22:00 to 06:00, and a night fits it by the clock, on the nights the clocks change too. A night can also run from one day's availability into the next day's where they meet: Monday 18:00 to 00:00, then Tuesday 00:00 to 08:00. Availability that stops at 23:59 doesn't reach past midnight: the draft says how many people on a night pattern that keeps off its nights.