---
title: "Wake Schedules and Authorizations"
canonical: "https://test.abhinandan.one/cli-overview/cli-wake"
markdown_url: "https://test.abhinandan.one/cli-overview/cli-wake.md"
publisher: "Primitive SDKs"
kind: "guide"
content_type: "reference"
category: "CLI"
parent: "cli-overview"
description: "Create, list, run, and delete cron-scheduled wake-ups for Primitive Functions with primitive wake-schedules-* and manage sender allowlists with wake-authorizations-*."
keywords: ["primitive wake-schedules-create", "primitive wake-authorizations-add", "wake schedules CLI", "wake authorizations allowlist", "primitive wake-schedules-run", "dispatch history"]
last_modified: "2026-08-21T18:22:43.359885+00:00"
published_at: "2026-08-11T18:54:55.729876+00:00"
sections:
  - {anchor: "prerequisites", title: "Prerequisites"}
  - {anchor: "step-discover-the-exact-flags-for-your-installed-version", title: "Discover the exact flags for your installed version"}
  - {anchor: "step-authorize-the-sender-that-may-wake-the-function", title: "Authorize the sender that may wake the function"}
  - {anchor: "step-create-the-wake-schedule", title: "Create the wake schedule"}
  - {anchor: "step-list-and-inspect-schedules", title: "List and inspect schedules"}
  - {anchor: "step-run-a-schedule-on-demand", title: "Run a schedule on demand"}
  - {anchor: "step-update-or-delete-a-schedule", title: "Update or delete a schedule"}
  - {anchor: "step-inspect-dispatch-history", title: "Inspect dispatch history"}
  - {anchor: "next-steps", title: "Next steps"}
---

> Documentation index: https://test.abhinandan.one/llms.txt

# Wake Schedules and Authorizations

Schedule recurring, DKIM-signed wake commands to your own Primitive Functions from the CLI, and manage the allowlist that authorizes who can trigger them.

Wake scheduling sends a typed wake command to one of your own [Primitive Functions](https://test.abhinandan.one/cli-overview/cli-functions.md) over real DKIM-signed email, on a cron cadence you control. Use it when a Function needs to run on a timer rather than only in response to inbound mail, for example a daily digest or a recurring status check.

Two command groups cover the feature:

- `primitive wake-schedules-*` creates, lists, updates, runs, and deletes the scheduled wake-ups themselves.
- `primitive wake-authorizations-*` manages the per-target allowlist that authorizes which senders may wake a given function.

Because each wake arrives as an ordinary DKIM-signed email to the target function, the allowlist is what decides whether that mail is allowed to wake it. Set up the authorization before you rely on a schedule.

## Prerequisites

- The CLI installed and authenticated. See [Authentication: login, signup, logout, whoami](https://test.abhinandan.one/cli-overview/cli-authentication.md).
- A deployed [Primitive Function](https://test.abhinandan.one/cli-overview/cli-functions.md) you want to wake on a schedule. Note its function id (a UUID, not its name).

### 1. Discover the exact flags for your installed version

Both command groups are generated from the OpenAPI spec, so the flag surface tracks your installed CLI version. List the subcommands and their flags before scripting anything:

```bash
primitive --help
primitive wake-schedules-list --help
primitive wake-authorizations-list --help
```

Every generated command also accepts `--json` for a machine-readable payload.

### 2. Authorize the sender that may wake the function

Wake commands arrive as email, so the target function needs an authorization entry allowing the sender that will wake it. Inspect the current allowlist first:

```bash
primitive wake-authorizations-list
```

Then add an entry with the flags `primitive wake-authorizations-list --help` and the create command's `--help` report for your version.

### 3. Create the wake schedule

Create a schedule that sends a wake command to the function on a cron cadence:

```bash
primitive wake-schedules-create --help
```

The create command reports the new schedule's id in its JSON output. Save that id: the update, run, and delete commands all address a schedule by id.

### 4. List and inspect schedules

```bash
primitive wake-schedules-list
```

The list shows each schedule's id and its cron cadence, so you can confirm the schedule you just created is registered.

### 5. Run a schedule on demand

Trigger a schedule immediately, without waiting for its next cron tick, to verify the target function handles the wake command:

```bash
primitive wake-schedules-run --help
```

Run this right after creating a schedule, so you confirm the function is reachable and authorized before trusting the cron cadence to fire it unattended.

### 6. Update or delete a schedule

Updating a schedule changes only the fields you pass; deleting it removes it permanently. Check the flag names for your version:

```bash
primitive wake-schedules-update --help
primitive wake-schedules-delete --help
```

### 7. Inspect dispatch history

The wake command group also exposes the dispatch history, so you can check whether a schedule's runs actually reached the function. Find the dispatch command for your version in the top-level help:

```bash
primitive --help | grep wake
```

> **Warning:** Deleting a wake authorization does not delete schedules that target the affected function. Those schedules keep firing on their cron cadence, but the wake email is no longer authorized for that target. Check the dispatch history after changing an authorization if you still expect that function to be woken.

> **Tip:** Function scope is always addressed by the function id UUID, not the function name. Grab it from `primitive functions-list` before creating a schedule or an authorization.
