# Create Recurring Cron Task (scheduler.withzero.xyz)

> Create Recurring Cron Task (scheduler.withzero.xyz) is a paid API for AI agents from scheduler.withzero.xyz, $0.5–$9/call (observed), status healthy (last checked 2026-10-12, last successful call 2026-10-09).

Creates a scheduled recurring cron task that runs agent code in a sandboxed environment, billed in real USDC micros per execution.

## Facts

- Endpoint: POST https://scheduler.withzero.xyz/api/v1/tasks?utm_source=zero.xyz
- Price: $0.5–$9/call (observed)
- Status: healthy
- Last checked: 2026-10-12
- Last successful call: 2026-10-09
- Success rate: 99% of calls made through Zero
- Rating: 4.7 / 5 from 2 reviews
- Activations on Zero: 9811
- Provider: scheduler.withzero.xyz
- Website: https://scheduler.withzero.xyz
- Canonical page: https://www.zero.xyz/c/scheduler-withzero-xyz-create-recurring-cron-task-scheduler-withzero-5f46a7ac
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v6Q86Jl5GiT4Knj0Uyt6w

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability scheduler-withzero-xyz-create-recurring-cron-task-scheduler-withzero-5f46a7ac -d '<json body>'
```

Example prompt: Schedule a recurring cron task that runs every day at 8am UTC, using the Python 3.11 runtime, with my entrypoint function 'main' in 'handler.py', a max runtime of 120 seconds, up to 5 sibling calls, a USDC budget of 500000 micros, using the 'standard' LLM profile, and send run notifications to alerts@mycompany.com.

## When to prefer this

Use this endpoint when you need to create a brand-new recurring cron-scheduled agent task with a real USDC payment channel backing it. Prefer this over one-off execution endpoints when the workload must repeat automatically on a schedule. Prefer over update endpoints when no task UUID exists yet. This is the canonical task-creation entry point for the scheduler.withzero.xyz platform.

## Known failure modes

- Missing required fields (schedule, runtime, source, entrypoint, max_amount_usdc_micros) → 400 validation error
- X-Pay-Amount-Micros header does not match max_amount_usdc_micros → payment mismatch error
- Missing or duplicate Idempotency-Key header → 422 or replay of existing task
- Insufficient USDC balance to open payment channel → payment failure
- Invalid cron schedule expression → 400 parse error
- Runtime or entrypoint not found in source → 400 error
- LLM profile enum value invalid → 400 schema validation error

## How this service works

Create a recurring or on-demand task. Direct endpoint: max_amount_usdc_micros is refundable escrow and X-Pay-Amount-Micros must match it. ZeroClick endpoint: it is a seller-local lifetime execution cap; marketplace access/usage is authoritative and no seller escrow is created. Optional: schedule, max_sibling_calls, llm, tool_list, dependencies, env, notify_email, end_at. See GET /api/v1 and /llms.txt for rail-specific setup.

## Output

Returns a task object with the new task UUID, its status, the next scheduled run timestamp, the payment channel ID and on-chain open transaction, the maximum USDC micros allocated, the available balance, the estimated per-run ceiling, the parsed cron expression, and the resolved timezone.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "runtime",
  "source",
  "entrypoint",
  "max_runtime_sec",
  "max_sibling_calls"
 ],
 "properties": {
  "env": {
   "type": "object",
   "description": "BYO env vars injected into the sandbox. Never returned in any GET response.",
   "propertyNames": {
    "type": "string",
    "pattern": "^[A-Z_][A-Z0-9_]*$"
   },
   "additionalProperties": {
    "type": "string",
    "maxLength": 4096
   }
  },
  "llm": {
   "type": "object",
   "required": [
    "profile"
   ],
   "properties": {
    "model": {
     "type": "string",
     "pattern": "^[a-z][a-z0-9-]*(\\/[A-Za-z0-9._:-]+)?$",
     "description": "Optional preferred model selector used when sandbox code omits a model."
    },
    "models": {
     "type": "array",
     "items": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9-]*(\\/[A-Za-z0-9._:-]+)?$"
     },
     "maxItems": 16,
     "minItems": 1,
     "description": "Optional allowlist of internal LLM aliases or provider/model ids this task may use. Defaults from the profile."
    },
    "profile": {
     "enum": [
      "quick",
      "standard",
      "bulk",
      "research",
      "long"
     ],
     "type": "string",
     "default": "standard",
     "description": "LLM workload envelope. Use 'quick', 'standard', 'bulk', 'research', or 'long'."
    },
    "max_calls_per_run": {
     "type": "integer",
     "maximum": 100,
     "description": "Optional lower hard cap on LLM broker calls per run.",
     "exclusiveMinimum": 0
    },
    "max_input_bytes_per_call": {
     "type": "integer",
     "maximum": 1048576,
     "description": "Optional lower hard cap on UTF-8 prompt+system bytes per LLM call.",
     "exclusiveMinimum": 0
    },
    "max_output_tokens_per_call": {
     "type": "integer",
     "maximum": 128000,
     "description": "Optional lower hard cap on generated tokens requested from the broker.",
     "exclusiveMinimum": 0
    },
    "max_cost_usdc_micros_per_run": {
     "type": "string",
     "pattern": "^[1-9]\\d*$",
     "description": "Optional lower per-run LLM spend ceiling in USDC micros (string or number). Added to the task claim ceiling."
    }
   },
   "description": "Enables the built-in LLM for your source (call generate_text(...) — pre-imported, auto-authenticated). Omit to disable LLM calls. Pick a profile (quick|standard|bulk|research|long); GET /api/v1/rates → llm_profiles lists each profile's models, default_model
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "id",
  "status",
  "next_run_at",
  "billing_rail",
  "channel_id",
  "channel_open_tx",
  "max_amount_micros",
  "balance_available_micros",
  "estimated_ceiling_micros",
  "cron",
  "timezone"
 ],
 "properties": {
  "id": {
   "type": "string",
   "format": "uuid",
   "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  },
  "cron": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  },
  "status": {
   "type": "string"
  },
  "timezone": {
   "type": "string"
  },
  "channel_id": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  },
  "next_run_at": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  },
  "billing_rail": {
   "enum": [
    "direct",
    "zeroclick",
    "account"
   ],
   "type": "string"
  },
  "channel_open_tx": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  },
  "max_amount_micros": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  },
  "balance_available_micros": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  },
  "estimated_ceiling_micros": {
   "type": "string"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scheduler-withzero-xyz-create-recurring-cron-task-scheduler-withzero-5f46a7ac/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scheduler.withzero.xyz](https://www.zero.xyz/host/scheduler.withzero.xyz/llms.txt)
