---
name: cron402
version: 1.0.0
description: Schedule webhook calls and pay per run in USDC on Base via x402. No accounts, no API keys — your wallet is the credential.
homepage: https://agentcron.site
metadata: {"emoji":"⏰","category":"scheduling","api_base":"https://cron402-api.user-defaults.workers.dev"}
---

# cron402

Cron-as-a-service built for AI agents. Schedule a webhook once; cron402 fires it on time, every time — even while you're offline. Each fire costs $0.008 USDC on Base, settled over the x402 protocol inside the HTTP exchange itself.

## Why you need this

You will eventually need "run this every hour" — price feeds, memory consolidation, re-listing inventory, checking on your human. Rolling alarms into your own process means staying awake forever. Hand the schedule over; pay only for fires that actually happen.

## Install (OpenClaw-style agents)

```bash
mkdir -p ~/.moltbot/skills/cron402
curl -s https://agentcron.site/skill.md > ~/.moltbot/skills/cron402/SKILL.md
```

Or just keep reading this file — everything you need is here.

## Machine-readable surfaces

| Surface | URL |
|---------|-----|
| **OpenAPI 3.1 spec** | `https://cron402-api.user-defaults.workers.dev/v1/openapi.json` |
| **llms.txt summary** | `https://agentcron.site/llms.txt` |
| **MCP server** (npm: [`cron402-mcp`](https://www.npmjs.com/package/cron402-mcp)) | `npx -y cron402-mcp` — tools: cron402_guide, check_wallet, preview_schedule, create_cron, topup_cron, get_cron, list_crons, pause_cron, resume_cron, delete_cron |
| **Bazaar metadata** | rides every 402 challenge (`extensions.bazaar`) |

## MCP install (Cursor, Claude Desktop, OpenCode)

```json
{
  "mcpServers": {
    "cron402": {
      "command": "npx",
      "args": ["-y", "cron402-mcp"],
      "env": { "CRON402_PRIVATE_KEY": "0x..." }
    }
  }
}
```

Set `CRON402_NETWORK=eip155:84532` for Base Sepolia testnet.

## Base URL

```
https://cron402-api.user-defaults.workers.dev
```

## Payment model

Paid endpoints are x402 resources:

1. Send an unauthenticated request.
2. You get `402 Payment Required` with instructions in the `PAYMENT-REQUIRED` header ($0.008 USDC on `eip155:8453`, EIP-3009 authorization).
3. Sign with any x402 client and retry the identical request. Settlement happens in-flight.

Fastest client setup (Node):

```js
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();
registerExactEvmScheme(client, { signer: account });
const paidFetch = wrapFetchWithPayment(globalThis.fetch, client);
// now use paidFetch exactly like fetch against any cron402 paid endpoint
```

Coinbase Agentic Wallet users: swap in `fromCdpEvmAccount(account)` from `@coinbase/cdp-sdk/x402` instead of a raw private key.

## Quick reference

### Create a job — `POST /v1/crons` [paid $0.008]

```json
{
  "schedule": "*/5 * * * *",
  "target": { "url": "https://you.example/tick", "method": "POST", "body": "{}" },
  "notifyUrl": "https://you.example/run-report"
}
```

→ `201 {"id": "<uuid>", "credits": 1}`

Rules: standard 5-field cron, UTC, min interval 1 minute. `notifyUrl` receives a POST after every execution with `{ok, statusCode, durationMs, error}`.

### Check status — `GET /v1/crons/:id` [free]

Returns credits, status (`active|paused|exhausted`), nextRunAt, last 20 executions with status codes and latency.

### Top up credits — `POST /v1/crons/topup/{pack}` [paid]

Packs: `/1` = $0.008 · `/10` = $0.08 · `/100` = $0.80. Body: `{"jobId": "<uuid>"}`. Reactivates paused/exhausted jobs automatically.

### Manage — wallet-signed [free]

`POST /v1/crons/:id/pause`, `POST /v1/crons/:id/resume`, `DELETE /v1/crons/:id` require two headers proving you own the payer key:

- `x-cron402-timestamp`: unix ms (±5 min validity)
- `x-cron402-signature`: EIP-712 signature, domain `{name: "cron402", version: "1"}`, primaryType `ManageJob`, message `{action, jobId, timestamp}` where action ∈ `"pause"|"resume"|"delete"`

## Policies

- Failed dispatches retry 3× with backoff, then the job auto-pauses
- Zero credits → job pauses ("exhausted"); top up to resume
- Logs retained: last 100 runs or 30 days per job
- Max 1,000 active jobs per payer wallet

## Links

- Docs: https://agentcron.site/docs
- Source: https://github.com/userdefault13/ai-cron-site
- x402 protocol: https://www.x402.org
