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.
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
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
MonkeyTasks is for teams who want reliable background execution without spending the first sprint inventing queue semantics, webhook auth, and failure tooling.
Immediate tasks, delayed delivery, and recurring schedules all live behind the same task API instead of separate queue and cron systems.
Use HMAC, bearer tokens, or custom headers per task so delivery security is not an afterthought bolted onto workers.
Tasks move through scheduled, queued, processing, completed, failed, dead_letter, and cancelled with a first-class query surface.
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
Tasks capture the shared delivery contract. Individual runs only need payload and timing, while the platform tracks status, retries, and schedule behavior for you.
Set webhook URL, auth mode, retry count, and timeout on the task definition so every run inherits sane delivery settings.
Run immediately, delay with seconds or duration strings, or let cron schedules create new tasks automatically.
Query by status or schedule, fetch a task by ID, cancel work, retry dead letters, and trigger schedules from the same surface.
Lifecycle
weekly-reports task flow
await tasks.query({ status: 'failed', limit: 20 })cron: '0 9 * * MON'Real Surface Area
These examples map to the implemented SDK and CLI commands. The product page stays anchored to the real interface.
Configure groups, enqueue work, query failures, and verify webhook signatures.
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!,
})The same task surface works for CI jobs, scripts, and operator workflows.
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
MonkeyTasks is built for product teams that need reliable background execution to line up with auth, plans, and the rest of their backend stack.
MonkeyTasks on the MonkeyHub platform
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.