Skip to content
MonkeyTasks

Durable task delivery without building your own queue stack first.

Run jobs immediately, after a delay, or on a cron. Configure webhook auth, inspect lifecycle state, and recover failures without stitching queues, schedules, and admin tooling together yourself.

One task surface across SDK, CLI, dashboard, and the rest of the MonkeyHub platform.

Task Surface

Configure the delivery contract once, then keep every run on the same rails.

typescript
const tasks = monkey.tasks('weekly-reports')

await tasks.configure({
	webhookUrl: 'https://api.acme.ai/hooks/reports',
	auth: { type: 'hmac', secret: process.env.MONKEY_WEBHOOK_SECRET! },
	retries: 5,
})

await tasks.run({ payload: { reportType: 'weekly' }, delay: '15m' })

Task-level defaults

Store webhook URL, auth mode, retries, and timeout on the task definition instead of repeating delivery settings on every run.

Immediate or delayed receipts

Runs return queued or scheduled receipts right away so the caller can track work without guessing what happened.

Query the messy cases

Filter failures, dead letters, or schedule-created tasks with the same org-safe task query surface.

Why MonkeyTasks

The job system that covers scheduling, delivery, and recovery in one product surface.

MonkeyTasks is for teams who want reliable background execution without spending the first sprint inventing queue semantics, webhook auth, and failure tooling.

Run now, later, or on a cron

Immediate tasks, delayed delivery, and recurring schedules all live behind the same task API instead of separate queue and cron systems.

Webhook auth built in

Use HMAC, bearer tokens, or custom headers per task so delivery security is not an afterthought bolted onto workers.

Queryable lifecycle state

Tasks move through scheduled, queued, processing, completed, failed, dead_letter, and cancelled with a first-class query surface.

Recovery paths included

Retries, timeouts, cancellation, manual schedule triggers, and dead-letter handling ship with the product instead of being left to app-specific glue.

How It Works

A predictable delivery pipeline instead of a pile of queue conventions.

Tasks capture the shared delivery contract. Individual runs only need payload and timing, while the platform tracks status, retries, and schedule behavior for you.

1. Define a task once

Set webhook URL, auth mode, retry count, and timeout on the task definition so every run inherits sane delivery settings.

2. Enqueue work with the timing you need

Run immediately, delay with seconds or duration strings, or let cron schedules create new tasks automatically.

3. Inspect and control the lifecycle

Query by status or schedule, fetch a task by ID, cancel work, retry dead letters, and trigger schedules from the same surface.

Lifecycle

Track every state without inventing your own admin model.

  • Immediate work starts as queued. Delayed work stays scheduled until it is ready to dispatch.
  • Failures can retry up to the configured limit before landing in dead_letter for operator review.
  • Task and schedule state remain queryable through the same org-scoped surface your app already uses.

weekly-reports task flow

scheduled -> queued -> processing -> completed
processing -> failed -> retry -> dead_letter
query
await tasks.query({ status: 'failed', limit: 20 })
schedule
cron: '0 9 * * MON'

Real Surface Area

The same task model in app code, CLI workflows, and webhook handlers.

These examples map to the implemented SDK and CLI commands. The product page stays anchored to the real interface.

TypeScript SDK

Configure groups, enqueue work, query failures, and verify webhook signatures.

typescript
import { Monkey, verifyWebhook } from '@monkeyhub/sdk'

const monkey = new Monkey(process.env.MONKEY_KEY!)
const tasks = monkey.tasks('weekly-reports')

await tasks.configure({
	webhookUrl: 'https://api.acme.ai/hooks/reports',
	auth: { type: 'hmac', secret: process.env.MONKEY_WEBHOOK_SECRET! },
	retries: 5,
	timeout: 60,
})

const [receipt] = await tasks.run({
	id: 'report-acme-2026-03-16',
	payload: { orgId: 'org_acme', reportType: 'weekly' },
	delay: '15m',
})

const failed = await tasks.query({ status: 'failed', limit: 20 })

const valid = verifyWebhook({
	signature: req.headers['x-monkeyhub-signature'] as string,
	timestamp: req.headers['x-monkeyhub-timestamp'] as string,
	body: rawBody,
	secret: process.env.MONKEY_WEBHOOK_SECRET!,
})

Monkey CLI

The same task surface works for CI jobs, scripts, and operator workflows.

bash
monkey tasks config weekly-reports \
	--input '{"webhookUrl":"https://api.acme.ai/hooks/reports","auth":{"type":"hmac","secret":"whsec_live_123"},"retries":5,"timeout":60}'

monkey tasks run weekly-reports \
	--input '{"id":"report-acme-2026-03-16","payload":{"orgId":"org_acme","reportType":"weekly"},"delay":"15m"}'

monkey tasks query weekly-reports \
	--input '{"status":"failed","limit":20}'

monkey tasks schedules create weekly-reports \
	--input '{"cron":"0 9 * * MON","timezone":"America/New_York","payload":{"reportType":"weekly-summary"}}'

Compare

More integrated than a stand-alone job runner, less custom glue than doing it yourself.

MonkeyTasks is built for product teams that need reliable background execution to line up with auth, plans, and the rest of their backend stack.

Need
DIY Queue Stack
Job Runner
MonkeyTasks
Timing model
Usually split between a queue, a cron service, and custom persistence for longer delays.
Great for code-first jobs, but often opinionated around their own execution model.
Immediate, delayed, and cron-driven runs all hang off one task definition with inline schedules.
Delivery security
You design webhook signing, rotation, and verification conventions yourself.
Some support exists, but auth patterns vary by provider and runtime.
HMAC, bearer, and header auth are first-class config on the task surface.
Status visibility
State tracking usually means another table plus custom admin tooling.
Dashboards exist, but app and platform state can drift apart.
The same lifecycle is queryable through SDK, CLI, dashboard, and API.
AI platform fit
You still have to line queue semantics up with org auth, usage limits, and agent tooling.
Strong for isolated background work, less integrated with a broader BaaS surface.
Shares auth, plans, org isolation, and MCP-era platform conventions with the rest of MonkeyHub.

MonkeyTasks on the MonkeyHub platform

Start with durable jobs now. Keep the rest of the backend stack one click away.

Use MonkeyTasks if you want the shortest path from webhook endpoint to reliable scheduled execution. Sign up for a real org and keys, or dive into the docs if you want the full lifecycle details first.