Use with AI

Cron for Claude is a plain REST API, so any AI assistant can create and manage your schedules for you — “run this prompt every morning at 9” becomes a real cron job. Two ready-made ways to wire it up.

1. Get an API key

Both options below need a key. Create one from Settings → API keys (Pro and Team plans). It is shown once — copy it then. The key is org-scoped and revocable any time; treat it like a password.

2a. As a Claude Code skill

Save the file below as ~/.claude/skills/cron-for-claude/SKILL.md. Claude Code loads it automatically — after that you can just say “schedule a daily summary of my repo at 9am” and it will call the API for you. Give Claude the key when it asks (or export CRONFORCLAUDE_KEY in your shell).

---
name: cron-for-claude
description: Create, list, pause, trigger and inspect scheduled Claude Code jobs on Cron for Claude (cronforclaude.com). Use when the user wants to run a prompt on a cron schedule, check scheduled jobs, or trigger/replay a run.
---

# Cron for Claude

Cron for Claude (https://cronforclaude.com) runs `claude -p` jobs on a
schedule. Jobs execute on the user's own machine via a runner daemon; you
drive everything through a REST API.

## Auth

Every request needs the user's API key (dashboard -> Settings -> API keys,
Pro/Team plans). Treat it as a secret — never echo it back.

    BASE="https://cronforclaude.com/api"
    AUTH="Authorization: Bearer $CRONFORCLAUDE_KEY"

## Before scheduling

A schedule only runs if the org has an online runner:

    curl -fsS "$BASE/runners" -H "$AUTH"

If none are online, tell the user to install one
(https://cronforclaude.com/docs/install-runner) before creating schedules.

## Endpoints

    GET    /schedules                 list
    POST   /schedules                 create
    GET    /schedules/:id             one
    PATCH  /schedules/:id             update — e.g. {"enabled": false} to pause
    DELETE /schedules/:id             delete
    POST   /schedules/:id/trigger     run once now
    GET    /jobs?scheduleId=&status=  run history
    GET    /jobs/:id                  one run incl. stdout / stderr / cost
    POST   /jobs/:id/replay           re-run
    GET    /projects                  list projects

## Create a schedule

POST /schedules with JSON. Required: name, prompt, and exactly one of
cron (standard 5-field) or runOnceAt (ISO 8601). Useful optionals: timezone
(default Asia/Hong_Kong), workingDir, projectId, maxRetries (0-10),
notifyOn ("never" | "on_failure" | "on_success" | "always").

    curl -fsS -X POST "$BASE/schedules" -H "$AUTH" \
      -H "content-type: application/json" -d '{
        "name": "nightly-digest",
        "cron": "0 9 * * *",
        "timezone": "Asia/Hong_Kong",
        "prompt": "Summarise recent commits in ./repo into notes.md.",
        "workingDir": "/Users/me/repo",
        "maxRetries": 2,
        "notifyOn": "on_failure"
      }'

## Rules

- Always restate the cron in plain words ("every day at 09:00
  Asia/Hong_Kong") and confirm with the user before creating or deleting.
- 402 = a plan quota was hit — show the message, do not retry.
- 401 / 403 = key invalid, revoked, or a Free-plan org calling a paid feature.
- Pause (PATCH enabled:false) rather than delete unless asked to delete.

2b. As a prompt for any AI chat

No Claude Code? Paste this into ChatGPT, Claude.ai, Cursor, or any assistant that can make HTTP requests, then give it your key in the next message.

You can manage my scheduled Claude Code jobs through the Cron for Claude
REST API (https://cronforclaude.com).

Auth: add header  Authorization: Bearer <MY_KEY>  to every request.
I will give you the key — never print it back to me.
Base URL: https://cronforclaude.com/api

Endpoints:
  GET    /schedules               list schedules
  POST   /schedules               create one
  PATCH  /schedules/:id           update — {"enabled": false} pauses it
  DELETE /schedules/:id           delete
  POST   /schedules/:id/trigger   run once now
  GET    /jobs?scheduleId=        run history
  GET    /jobs/:id                one run's output + cost
  GET    /runners                 a runner must be "online" for jobs to run

Create body (JSON): name, prompt, and exactly one of cron (5-field) or
runOnceAt (ISO 8601); optional timezone, workingDir, maxRetries, notifyOn.

Rules: restate any cron in plain words and confirm with me before creating
or deleting. 402 = quota hit (do not retry). 401/403 = key or plan problem.

Staying safe

  • The key grants full admin access to your org over the API. Paste it only into tools you trust, and revoke it from the dashboard if a chat history might leak.
  • The skill tells the AI to confirm cron expressions with you before creating anything — keep that instruction if you adapt it.
  • Jobs still only run on your runner, on your Claude plan. The AI schedules the work; your machine does it.

Full endpoint reference: REST API.