# Swift Bot Labs Toolbox – Cron Next Occurrence Calculator

> Swift Bot Labs Toolbox – Cron Next Occurrence Calculator is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Computes the next N scheduled fire times for a cron expression, optionally anchored to a specific start time and timezone.

## Facts

- Endpoint: GET https://x402-toolbox.swiftbotlab.workers.dev/v1/cron/next?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-toolbox-cron-next-occurrence-calculator-24a3cf7a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h56DocXZW1rhh97yep3Yi

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 swift-bot-labs-toolbox-cron-next-occurrence-calculator-24a3cf7a
```

Example prompt: When will '30 9 * * mon-fri' next fire after now, shown in America/New_York time — give me the next 3 occurrences.

## When to prefer this

Use this endpoint when you need a quick, deterministic calculation of upcoming cron fire times without spinning up a cron library locally. Ideal for agents validating scheduled job configurations, previewing automation schedules, or debugging missed triggers. Prefer it over general-purpose code execution when you want a pay-per-call, stateless solution with no account setup required.

## Known failure modes

- Invalid or malformed cron expression returns an error response
- Unrecognized timezone string may cause computation failure or fallback to UTC
- Missing required 'expression' query parameter returns a 400-level error
- count value out of supported range may be ignored or cause an error
- Payment not provided or insufficient USDC causes HTTP 402 response before processing

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

Returns a JSON object with ok:true, the tool name 'cron-next', and a result containing the evaluated cron expression plus an array of upcoming fire times each with a UTC ISO timestamp and a local timezone-adjusted ISO timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "expression"
     ],
     "properties": {
      "tz": {
       "type": "string"
      },
      "from": {
       "type": "string",
       "description": "Start time (default now)"
      },
      "count": {
       "type": "string"
      },
      "expression": {
       "type": "string"
      }
     },
     "additionalProperties": false
    },
    "discoverable": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "cron-next",
  "result": {
   "next": [
    {
     "utc": "2026-10-27T13:30:00.000Z",
     "local": "2026-10-27T09:30:00-04:00"
    }
   ],
   "expression": "30 9 * * mon-fri"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-toolbox-cron-next-occurrence-calculator-24a3cf7a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
