---
title: "Create a wake schedule"
method: POST
path: "/wake/schedules"
tags: ["Wake"]
---

# Create a wake schedule

`POST /wake/schedules`

Create a cron schedule that sends a wake.dispatch command to one of your
own function addresses. `from` and `to` must differ (no self-dispatch);
the cron expression and IANA timezone are validated and the first fire
time is computed without firing immediately.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `from_address` string, required — Sending identity (must be a domain the org can sign).
  - `target_address` string, required — Your function address (must differ from from_address).
  - `command` string, required
  - `args` object — Optional JSON object passed through to the woken function.
  - `cron_expr` string, required
  - `timezone` string
  - `note` string

## Response `201`

Wake schedule created

- object
  - `success` true, required
  - `data` object, required — A cron schedule that sends a wake.dispatch command to a function.
    - `id` string, uuid, required
    - `from_address` string, nullable — The sending identity the wake is signed as.
    - `target_address` string, required — The function address the wake is delivered to.
    - `command` string, required
    - `args` object
    - `cron_expr` string, required — 5-field cron expression.
    - `timezone` string, required — IANA timezone the cron is evaluated in.
    - `next_run_at` string, date-time, required
    - `last_run_at` string, date-time, nullable
    - `enabled` boolean, required
    - `note` string, nullable
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `400` — Invalid request parameters
- `401` — Invalid or missing API key

---

[API](https://skmtc.dev/primitive/apis/primitive-api.md) · [All operations](https://skmtc.dev/primitive/apis/primitive-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/primitive/primitive-api/revisions/c2299d28022c/schema)
