{"schema_version":"1.0","publisher":"Primitive SDKs","canonical_url":"https://test.abhinandan.one/cli-overview/cli-wake","markdown_url":"https://test.abhinandan.one/cli-overview/cli-wake.md","article":{"id":"4cb1d594-0aab-4a91-9472-3faf41f56bcd","article_slug":"cli-wake","parent_article_slug":"cli-overview","parent_article_title":"What is the Primitive CLI?","kind":"guide","published_at":"2026-08-11T18:54:55.729876+00:00","keywords":["primitive wake-schedules-create","primitive wake-authorizations-add","wake schedules CLI","wake authorizations allowlist","primitive wake-schedules-run","dispatch history"],"meta_description":"Create, list, run, and delete cron-scheduled wake-ups for Primitive Functions with primitive wake-schedules-* and manage sender allowlists with wake-authorizations-*.","og_image_url":null,"source_file_paths":[],"recording_id":null,"replayable":false,"task_name":"Wake Schedules and Authorizations","category":"CLI","summary":null,"description":"Schedule recurring, DKIM-signed wake commands to your own Primitive Functions from the CLI, and manage the allowlist that authorizes who can trigger them.","content_kind":"repo_page","content_markdown":"Wake scheduling sends a typed wake command to one of your own [Primitive Functions](cli-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.\n\nTwo command groups cover the feature:\n\n- `primitive wake-schedules-*` creates, lists, updates, runs, and deletes the scheduled wake-ups themselves.\n- `primitive wake-authorizations-*` manages the per-target allowlist that authorizes which senders may wake a given function.\n\nBecause 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.\n\n## Prerequisites\n\n- The CLI installed and authenticated. See [Authentication: login, signup, logout, whoami](cli-authentication).\n- A deployed [Primitive Function](cli-functions) you want to wake on a schedule. Note its function id (a UUID, not its name).\n\n<Steps>\n\n<Step title=\"Discover the exact flags for your installed version\">\n\nBoth 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:\n\n```bash\nprimitive --help\nprimitive wake-schedules-list --help\nprimitive wake-authorizations-list --help\n```\n\nEvery generated command also accepts `--json` for a machine-readable payload.\n\n</Step>\n\n<Step title=\"Authorize the sender that may wake the function\">\n\nWake commands arrive as email, so the target function needs an authorization entry allowing the sender that will wake it. Inspect the current allowlist first:\n\n```bash\nprimitive wake-authorizations-list\n```\n\nThen add an entry with the flags `primitive wake-authorizations-list --help` and the create command's `--help` report for your version.\n\n</Step>\n\n<Step title=\"Create the wake schedule\">\n\nCreate a schedule that sends a wake command to the function on a cron cadence:\n\n```bash\nprimitive wake-schedules-create --help\n```\n\nThe 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.\n\n</Step>\n\n<Step title=\"List and inspect schedules\">\n\n```bash\nprimitive wake-schedules-list\n```\n\nThe list shows each schedule's id and its cron cadence, so you can confirm the schedule you just created is registered.\n\n</Step>\n\n<Step title=\"Run a schedule on demand\">\n\nTrigger a schedule immediately, without waiting for its next cron tick, to verify the target function handles the wake command:\n\n```bash\nprimitive wake-schedules-run --help\n```\n\nRun this right after creating a schedule, so you confirm the function is reachable and authorized before trusting the cron cadence to fire it unattended.\n\n</Step>\n\n<Step title=\"Update or delete a schedule\">\n\nUpdating a schedule changes only the fields you pass; deleting it removes it permanently. Check the flag names for your version:\n\n```bash\nprimitive wake-schedules-update --help\nprimitive wake-schedules-delete --help\n```\n\n</Step>\n\n<Step title=\"Inspect dispatch history\">\n\nThe 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:\n\n```bash\nprimitive --help | grep wake\n```\n\n</Step>\n\n</Steps>\n\n<Warning>\n\nDeleting 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.\n\n</Warning>\n\n<Tip>\n\nFunction 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.\n\n</Tip>\n\n## Next steps\n\n<CardGroup cols={2}>\n\n<Card title=\"Primitive Functions: Deploy, Route, and Manage\" href=\"cli-functions\">\n\nScaffold, deploy, and route the Function a wake schedule targets.\n\n</Card>\n\n<Card title=\"Direct API Access and Generic Commands\" href=\"cli-generic-api-access\">\n\nList every generated operation and inspect its parameters from the terminal.\n\n</Card>\n\n<Card title=\"Primitive Functions and Recipient Routing\" href=\"functions-and-routing-concepts\">\n\nUnderstand how inbound mail reaches a function in the first place.\n\n</Card>\n\n<Card title=\"What is the Primitive CLI?\" href=\"cli-overview\">\n\nSee how the wake command groups fit the rest of the CLI surface.\n\n</Card>\n\n</CardGroup>","canonical_base_url":"https://test.abhinandan.one","seo_indexing_enabled":true,"last_modified":"2026-08-21T18:22:43.359885+00:00","video_url":null,"voiceover_url":null,"tools_used":[],"demonstrated_by":[],"steps":[],"related_links":[],"intro":null,"prerequisites":[],"verification":[],"troubleshooting":[],"suggest_edit_url":null,"raise_issue_url":"https://github.com/abhi-browzer/primitive-sdks/issues/new?title=Docs+feedback%3A+Wake+Schedules+and+Authorizations&body=Page%3A+https%3A%2F%2Ftest.abhinandan.one%2Fcli-wake","page_feedback_enabled":true,"verified_ref":null,"verified_at":"2026-08-11T18:38:45.205849+00:00"}}