# Schedule a Check Sheet

A check sheet does nothing until something schedules it. A **trigger** tells Kanoa when to schedule it, such as at a shift
change or when a new product starts. **Timers** decide how long inspectors have to start the check. This lesson shows you how to
set both.

:::info
Changing triggers needs the **Configure Quality** security function. On a released check sheet, you change triggers through a
revision. See [Release and Revise](./6-release-and-revise.md).
:::

## Add a Trigger

1. Open **Configuration → Quality → Check Sheets** and open the check sheet.
2. Go to the **Triggers** tab.
3. Click the **+** button to add a trigger, or the edit button to change one.
4. Choose the trigger type, set its options and timers, and save.

![Triggers tab](https://docs.kanoa.ai/img/quality/chkShtEditorTriggerTab.png)

![Trigger editor](https://docs.kanoa.ai/img/quality/triggerEditor.png)

You can add more than one trigger. A check sheet with no trigger can still be scheduled by hand.

## Choose a Trigger Type

| Trigger | When it schedules the check sheet |
| --- | --- |
| **Manual** | Only when someone adds the check. It sets how long the inspector has to take it. |
| **Mode Change** | When an asset changes mode, such as Changeover to Production. An optional **From Mode** limits it. |
| **Product Change** | When the running product changes. |
| **Shift Change** | When the current shift matches the trigger's shift settings. |
| **Timed Interval** | Periodically, based on the mode and shift settings. |
| **Recurring** | On a repeating calendar rule, such as every weekday at 6:00. Times use the asset's site time zone. |
| **State Change** | When an asset has been in a chosen state for at least the minimum time. |
| **Infeed Count**, **Outfeed Count**, **Waste Count**, **General Count** | Every *n* counts of that counter. |
| **Re-Test** | When a check sheet is scheduled because a re-test is needed. |

A **Product Change** trigger has three options:

- **Every Product** requires a check every time the product changes.
- **Unique Products Per Shift** requires a check once per product per shift.
- **Once Per Shift** requires one check per shift.

A trigger that fires while the check sheet is already scheduled aborts the old one if it hasn't been started, and creates a
new one.

::embed-section{src="../../kanoa-quality/checkSheets.md#trigger-types" collapsed="true" summary="Reference Materials: Trigger Types - Every trigger type and how count triggers work."}

## Set the Timers

Each trigger has four timers, all in minutes.

| Timer | What it does |
| --- | --- |
| **Delay** | Time between the trigger firing and the check sheet being scheduled. Until it passes, no screen shows the check. |
| **Coming Due** | How long a scheduled check shows as upcoming before it becomes due. |
| **Over Due** | How long the inspector has to start the check once it is due. |
| **Grace** | How long the check stays over due before it is **Missed**. |

A check that nobody starts moves through these statuses on its own:

`In Delay → Coming Due → Due → Over Due → Missed`

It is **In Delay** only when the trigger has a Delay. A **Missed** check shows on compliance reports.

A common use of **Delay** is a shift-change trigger, so the incoming shift has time to settle before checks appear.

## Use the Manual Trigger

A check that an inspector adds with **Add Check** is **Due** as soon as it's added, so Delay and Coming Due don't apply. Only the
**Manual** trigger's **Over Due** and **Grace** do.

For example, with **Over Due** `30` and **Grace** `30`, a manual check is Over Due after 30 minutes and Missed after 60. The
sample Receiving Inspection uses this.

{/*
TODO: Confirm on a gateway where on the Triggers tab the four timers appear for a Manual trigger, and the labels shown for Over Due and Grace.
*/}

:::note
State Change and the count triggers are checked by a timer on the gateway. A check can be scheduled up to one timer
interval after the state or count is reached.
:::

::embed-section{src="../../kanoa-quality/checkSheets.md#timers" collapsed="true" summary="Reference Materials: Timers - Delay, Coming Due, Over Due, Grace and the check statuses."}

## Check Your Understanding

1. An inspector adds a check by hand. Which timers apply to it?
2. Which timer decides when a check becomes **Missed**?
3. Why would you add a **Delay** to a shift-change trigger?

<details>
<summary>Answers</summary>

1. Only **Over Due** and **Grace** from the **Manual** trigger. Delay and Coming Due don't apply.
2. **Grace**. It is how long the check stays over due before it is Missed.
3. So the incoming shift has time to settle before checks appear.

</details>
