tasks.do
Task Queues That Scale Infinitely
Distributed task processing with automatic retries, priority queues, and intelligent scheduling. Handle millions of jobs per second with durable execution, dead letter queues, and sub-100ms latency.
import { Tasks } from 'tasks.do' // Durable task queue with priority and retriesconst EmailQueue = Tasks.queue('emails', { concurrency: 1000, retry: { maxAttempts: 3, backoff: 'exponential' }}) await EmailQueue.enqueue({ to: user.email, priority: 'high' }) EmailQueue.process(async job => await sendEmail(job.data)) // Intelligent error handlingon.Task.failed($ => { if ($.data.attempts >= 3) $.Task.send.DeadLetter({ reason: $.data.error })})
One of 48 primitives
tasks.do sits in Workflows: triggers, steps and functions. Every .do shares one grammar, Business-as-Code, and one SDK.
Data
Records, vocabulary and search
Insight
Measure, test and trace
Frequently asked questions
Tasks.do uses declarative TypeScript with automatic priority scheduling, intelligent retries, and durable execution. Traditional queues require manual setup of Redis/RabbitMQ/SQS, connection management, and retry logic. Tasks.do provides priority queues, dead letter queues, scheduled jobs, rate limiting, and concurrency control out of the box. Jobs are durable—server restarts or crashes never lose queued work. Full observability with metrics, traces, and logs included.
Automatic retry with configurable strategies: exponential backoff (default 100ms to 1hr), linear, or custom intervals. Failed tasks move to dead letter queues after max attempts for manual inspection and reprocessing. Define custom retry policies per job type, fallback strategies for specific errors, and compensation logic for partial failures. State persisted before each attempt—never lose progress even with catastrophic failures. Full error context captured for debugging.
Yes. Durable execution with automatic state persistence means tasks can run indefinitely without consuming resources while waiting. Schedule tasks for future execution (days, weeks, months ahead), wait for external events or webhooks, pause for human approvals, or implement complex workflows with multiple stages. No timeouts on task execution—handle long-running batch processes, data migrations, or multi-day workflows with ease.
Full local testing with Vitest or Jest. Mock external services, simulate failures at any step, and validate retry logic deterministically. Time-travel debugging lets you inspect task state at any point in execution. Fast-forward scheduled tasks, trigger failure scenarios, and verify behavior under all conditions before deploying to production. Integration tests run against isolated edge environments with production parity.
Yes. AI agents monitor queue metrics (depth, latency, failure rates) and automatically adjust concurrency, batching, and priority levels. Agents can restructure task pipelines, suggest better retry strategies, identify bottlenecks, and optimize resource allocation based on patterns. Task definitions are semantic objects—agents understand business context and can refactor queues for better performance while maintaining correctness.