# Enqueue Task for Immediate Execution (Non-Blocking)

> Enqueue Task for Immediate Execution (Non-Blocking) is a paid API for AI agents from scheduler.withzero.xyz, paid per call via MPP, metered — billed by usage, status unknown (last checked 2026-09-14).

Pulls a scheduled task's next run forward to now so the dispatch tick executes it within ~1 minute, without blocking the caller.

## Facts

- Endpoint: POST https://scheduler.withzero.xyz/api/v1/tasks/{id}/enqueue
- Price: metered — billed by usage
- Payment: MPP
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 1
- Provider: scheduler.withzero.xyz
- Website: https://scheduler.withzero.xyz
- Canonical page: https://www.zero.xyz/c/scheduler-withzero-xyz-enqueue-task-for-immediate-execution-non-812cae3e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2KUKHdS8uCp_qtfE47YVo

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-enqueue-task-for-immediate-execution-non-812cae3e -d '<json body>'
```

Example prompt: A webhook just came in — go ahead and enqueue task 3f2a1b4c-0000-0000-0000-000000000001 to run within the next minute without waiting for it to finish.

## When to prefer this

Use this endpoint when you need to trigger a task run immediately from an event-driven context (e.g. webhook handler) and do not need to wait for the result. It is ideal for burst event coalescing since multiple calls within the same dispatch tick window collapse into a single run. Prefer this over POST /tasks/:id/runs when you want non-blocking fire-and-forget semantics. For synchronous execution where you need the final run status returned immediately, use the synchronous runs endpoint instead.

## Known failure modes

- Task ID not found — 404 not found
- Task is paused or in terminal state — returns enqueued: false (safe no-op, not an error)
- Invalid UUID format — 400 bad request
- Unauthorized caller — 401/403 if ownership proof missing
- Scheduler service unavailable — 5xx error

## How this service works

DEPRECATED — use POST /tasks/:id/trigger. Behaves identically (async, non-blocking). 📖 Full guide: https://scheduler.withzero.xyz/llms.txt

## Output

Returns a JSON object with the task's UUID, current status string, the updated next_run_at timestamp (or null), and an 'enqueued' boolean indicating whether the run was actually pulled forward (true) or the task was inactive and this was a no-op (false).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "properties": {},
 "description": "Empty body. Triggers a run asynchronously — pulls the task's next run forward to now so the dispatch tick executes it within ~1 minute; returns immediately WITHOUT waiting for the result. Contrast POST /tasks/:id/runs (synchronous). A non-active task is a safe no-op.",
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "task_id",
  "status",
  "next_run_at",
  "enqueued"
 ],
 "properties": {
  "status": {
   "type": "string"
  },
  "task_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)$"
  },
  "enqueued": {
   "type": "boolean",
   "description": "true if next_run_at was pulled forward; false if the task was not active (no-op)."
  },
  "next_run_at": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ]
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scheduler-withzero-xyz-enqueue-task-for-immediate-execution-non-812cae3e/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)
