# Crews and Scheduling

Operators are usually scheduled as a **crew**, a named group that works together. Crews belong to a **site**, not a single line, because a crew covers whichever lines need people that day. When a crew is assigned to a site-level shift, the schedule applies to every line beneath the site, so it lines up with whichever line each operator actually logs into.

Crew membership has start and end dates. When someone moves from Day Crew to Evening Crew, their history on Day Crew is kept, and reports for last month still show who was on which crew at the time.

:::action[Create a crew and add members]

1. Navigate to **Ops → Scheduling → Crews**.
2. On the **Crews** tab, create a crew named `Day Crew` at the **Philadelphia** site.
3. On the **Crew Members** tab, select `Day Crew` and add `johnDoe` and `marcoDiaz`, each with a start date of 12:00 AM today (earlier than the shift assignment you'll create next) and no end date.

:::

:::action[Schedule the crew]

1. On the **Scheduling** tab, assign `Day Crew` to the **Day Shift** at Philadelphia, with a start of 7:00 AM today and an end of 3:00 PM today. If you're doing this lesson outside those hours, assign the crew to the shift you're actually working (for example, Evening Shift, 3:00 PM to 11:00 PM) so the next lesson's logins fall inside the scheduled window.
2. Review the assignments list. You'll see one assignment per crew member, not one for the crew.

:::

The assignment's start and end are the scheduled time OLE is measured against. Kanoa doesn't recalculate them from the shift calendar later, so enter the times you actually want people scheduled for.

Assigning a crew takes a snapshot of who is on the crew on the assignment's start date, so a member whose crew start date is later than the assignment's start isn't included. Adding someone to the crew next week doesn't change shifts that were already assigned, so the schedule stays a true record of what was planned.

:::tip[Scheduling one person]
To cover a gap without changing a crew, assign an individual operator to a shift on the same tab. Crew and individual assignments land in the same schedule, and Kanoa blocks overlapping assignments for the same person on the same shift or asset.
:::

:::info[Is scheduling required?]
No, but without it, Attendance and Labor Gap have nothing to compare against. An operator who logs in without being scheduled is measured against the whole report window instead, which makes their attendance look low. That's expected, not an error.
:::

:::check

Copy this script into the Ignition Designer Script Console (**Tools → Script Console**) and run it. It checks that `Day Crew` exists at the Philadelphia site, that `johnDoe` and `marcoDiaz` are current members, and that each of them has a shift assignment from the crew today with an end time. It also checks that each member is scheduled right now, so the next lesson's logins are counted. A NOTE flags assignments on a different shift or asset. It doesn't change anything.

<details>
<summary>Show the check script</summary>

::check-script{src="ops/11-operator-effectiveness/1-crews-and-scheduling.py" title="checkLesson-crews.py"}

</details>

:::
