> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scaling.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Follow-the-sun Escalation

> Create two working hours sets, gate escalation layers with during/outside conditions in the dashboard, read the resolution preview, and understand the backstop so a page never sleeps and never silently dies.

Follow-the-sun escalation pages the team that is awake. This guide gates an escalation policy's layers with [working hours conditions](/concepts/working-hours#layer-conditions-follow-the-sun-escalation) so a daytime incident reaches your UK rotation during UK hours and your US rotation otherwise — without maintaining parallel policies. For the concepts behind it, see [Working hours](/concepts/working-hours) and [Escalation policies](/concepts/escalation-policies).

<Tip>
  Managing this from a script or pipeline instead? See the follow-the-sun section of the [Escalation policies API](/developers/escalation-api#follow-the-sun-gate-layers-with-working-hours) guide, or manage it as code with the [`scaling_working_hours`](/integrations/terraform#scaling_working_hours) Terraform resource.
</Tip>

## Prerequisites

* Two on-call schedules — one per region — that you want to page at different times of day. See [Set Up On-call](/guides/set-up-oncall-schedule).
* An [escalation policy](/guides/configure-escalation-policy) you can add layers to.

<Steps>
  <Step title="Create the working hours sets">
    Open the **Working Hours** page (`/working-hours`) and click **Create working hours**. Each set carries its own timezone — it is never inferred from a schedule — and one or more weekly windows.

    Create a **UK office hours** set:

    * **Name** — *UK office hours*.
    * **Timezone** — `Europe/London`.
    * **Weekly windows** — toggle **Mon**–**Fri** and set the window to `09:00`–`17:00`. Use **Add window** for split hours.

    Click **Create**, then repeat for a **US office hours** set (`America/New_York`, Mon–Fri `08:00`–`18:00`).
  </Step>

  <Step title="Gate the layers with conditions">
    Open your escalation policy and add (or edit) two layers. On each layer's form, set the **Working Hours Condition**:

    * **Layer 1** — target the **UK** rotation, choose **Only during working hours**, and pick the **UK office hours** set.
    * **Layer 2** — target the **US** rotation, choose **Only during working hours**, and pick the **US office hours** set.

    Order layer 1 above layer 2.

    <Note>
      Choose **Only outside working hours** when you want a layer to participate *only* outside a set's windows — for example a night-shift layer gated outside UK office hours. You never need to author a mirror "after hours" set. Leave the condition on **Always (no condition)** to make a layer unconditional.
    </Note>
  </Step>

  <Step title="Preview who would be paged right now">
    Skip-cascades make "who gets paged when" hard to read from the layer list alone, so the policy detail page shows a **Who would be paged right now** preview. It evaluates every layer's condition at the current instant and tells you which layer a page would actually reach:

    * During UK hours, it resolves to **layer 1** (UK rotation).
    * Outside UK hours but during US hours, layer 1 is skipped and it resolves to **layer 2** (US rotation).

    Conditions are evaluated **at the instant escalation reaches the layer**, never at incident creation — a page raised at 08:50 that escalates at 09:05 correctly reaches a layer gated during 09:00–17:00.
  </Step>

  <Step title="Understand skip and the backstop">
    Two rules make this safe:

    * **Skip, never wait.** A layer whose condition does not hold is skipped and escalation proceeds to the next layer immediately. scaling.cloud cannot hold a page until working hours begin — a page that reached an escalation policy was already judged worth waking someone for.
    * **Backstop.** If *every* layer's condition fails at an evaluation instant, the **last layer is paged unconditionally**. A page never silently dies to misconfiguration — even if that means paging the last layer outside its own hours.

    When every layer on a policy is conditional, the preview shows a non-blocking advisory: *"Every layer is conditional. If all conditions fail, the last layer is paged unconditionally."* It never blocks the save; it just makes the backstop legible. A good pattern is to make your **final** layer unconditional — a manager or fallback schedule — so the page lands somewhere deliberate.
  </Step>
</Steps>

## Next steps

<Card title="Working hours concept" href="/concepts/working-hours" icon="clock">
  Timezone semantics, the org default used by insights, and deletion rules.
</Card>

<Card title="Manage working hours as code" href="/integrations/terraform#scaling_working_hours" icon="terminal">
  The `scaling_working_hours` Terraform resource and the step `condition` block.
</Card>
