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

# Scheduler Node

> Automate parameter changes and trigger events at specific times using the Scheduler node

# Automating events on a timeline with the Scheduler node

The **Scheduler** node is a timeline-based trigger system that fires named events at specific timestamps. Use it to automate parameter changes, switch prompts, or sequence any trigger-compatible node on a timeline, all without writing code.

***

## What it does

You define a set of **named triggers** at specific times (in seconds). When playback reaches a trigger's timestamp, it fires an output signal on that port. Other nodes (like **Prompt List** or **Control**) can listen for those signals and respond automatically.

The Scheduler runs entirely in the browser with high-frequency updates, so timing is precise enough for most creative workflows.

***

## Adding a Scheduler node

<Steps>
  <Step title="Open the node picker">
    In Workflow Builder, click the **\[+]** button on the canvas.
  </Step>

  <Step title="Search for Scheduler">
    Type **Scheduler** in the search field and click it to place it on the canvas.
  </Step>
</Steps>

***

## Node anatomy

### Controls

| Control           | Description                             |
| ----------------- | --------------------------------------- |
| **Play / Stop**   | Start or stop playback                  |
| **Reset**         | Jump back to time 0                     |
| **Loop** checkbox | Loop playback when it reaches the end   |
| **Duration**      | Total length of the sequence in seconds |

### Input handles

| Handle  | Type    | Description                                                                   |
| ------- | ------- | ----------------------------------------------------------------------------- |
| `start` | trigger | Toggle play/pause from an external node (e.g. another Scheduler or a Control) |
| `reset` | trigger | Reset to time 0 from an external node                                         |

<Tip>
  You can drive the `start` and `reset` inputs from another Scheduler to chain sequences together for more complex automations.
</Tip>

### Output handles

| Handle       | Type    | Description                                |
| ------------ | ------- | ------------------------------------------ |
| `elapsed`    | number  | Current playback position in seconds       |
| `is_playing` | boolean | Whether the scheduler is currently running |
| `tick`       | trigger | Fires on every trigger event               |
| *(custom)*   | trigger | One handle per named trigger you define    |

<Note>
  The `elapsed` output updates approximately every 50 ms. This keeps performance smooth while still providing responsive timing for downstream nodes.
</Note>

***

## Defining triggers

<Steps>
  <Step title="Open the Triggers section">
    In the Scheduler node, find the **Triggers** section and click **+ Add** to create a new trigger entry.
  </Step>

  <Step title="Set the name">
    Give the trigger a name. This becomes the output handle name (e.g. `switch_prompt`).
  </Step>

  <Step title="Set the time">
    Enter the timestamp in seconds when this trigger should fire.
  </Step>

  <Step title="Repeat for additional triggers">
    Add as many timestamp entries as you need.
  </Step>

  <Step title="Connect the output">
    Connect the named output handle to the target node's trigger input.
  </Step>
</Steps>

When the playback position passes a trigger's timestamp, the handle flashes orange and sends a signal downstream.

<Warning>
  Trigger names must be unique within a Scheduler node. If you use the same name twice, both entries will share the same output handle.
</Warning>

<Tip>
  Edge cables flash white briefly when a trigger fires. This is useful for visual debugging to confirm your triggers are firing when expected.
</Tip>

***

## Example: Auto-advance a Prompt List

<Steps>
  <Step title="Add the nodes">
    Place a **Scheduler** node and a **Prompt List** node on the canvas.
  </Step>

  <Step title="Define the triggers">
    In the Scheduler, add triggers named `next` at 0, 5, 10, and 15 seconds.
  </Step>

  <Step title="Connect them">
    Connect `Scheduler > next` to `Prompt List > next`.
  </Step>

  <Step title="Press Play">
    Hit Play on the Scheduler. The prompt advances every 5 seconds automatically.
  </Step>
</Steps>

***

## Example: Loop a sequence

<Steps>
  <Step title="Set the duration">
    Set **Duration** to `20` and enable the **Loop** checkbox.
  </Step>

  <Step title="Add your triggers">
    Add triggers for all the events in your 20-second cycle.
  </Step>

  <Step title="Press Play">
    When playback reaches 20 s it wraps back to 0 and re-fires all triggers in order.
  </Step>
</Steps>

***

## See also

<CardGroup cols={2}>
  <Card title="Tempo Node" icon="music" href="/scope/guides/tempo-node">
    Sync to a live beat source instead of fixed timestamps
  </Card>

  <Card title="Workflow Builder" icon="diagram-project" href="/scope/guides/workflow-builder">
    Learn the basics of composing node graphs
  </Card>
</CardGroup>
