Documentation Index: Fetch llms.txt first to discover every published page. This page is also available as Markdown at /cli-overview/cli-wake.md.
Verified · 8/11/2026

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 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#

  1. 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:

    primitive --help
    primitive wake-schedules-list --help
    primitive wake-authorizations-list --help
    

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

  2. 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:

    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. 3

    Create the wake schedule#

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

    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. 4

    List and inspect schedules#

    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. 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:

    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. 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:

    primitive wake-schedules-update --help
    primitive wake-schedules-delete --help
    
  7. 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:

    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.

Next steps#

Was this page helpful?

© Primitive SDKs

Powered by Browzer