DeesseJS
  • Enterprise
  • Pricing
DeesseJS logoDeesseJS

Software engineering as a commodity: agents that code, workflows that scale, infrastructure that works. Built with the DeesseJS ecosystem.

Ecosystem

  • Errors
  • DRPC
  • Collections
  • FP

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base

Use cases

  • SaaS apps
  • AI products
  • Landing pages
  • API backends
  • Internal tools

Company

  • About
  • Manifesto
  • Principles
  • Vision
  • Enterprise
  • Delivery
  • Help

Legal & Trust

  • Privacy
  • Terms
  • Cookies
  • DPA
  • Security

Community

  • Open Source Program
  • Github
  • LinkedIn
  • X

Explore

  • Customers
  • Templates
  • Ecosystem
  • Stack
© 2026 DeesseJS. All rights reserved.
  1. Knowledge Base
  2. Queue
  3. Run background jobs
background-jobsasync

Run background jobs

Queue and worker patterns for async work outside your request path.

Not every operation belongs in a request path. Long ingestions, fan-out notifications, and third-party API retries should run as background jobs that the request hands off and returns from immediately.

1. Pick a queue

DeesseJS uses Postgres as the queue substrate. The jobs table is provisioned by the database package; the worker binary in @deessejs/cli reads from it.

2. Enqueue

import { enqueue } from "@workspace/queue"

await enqueue("send-welcome-email", { userId: user.id })

3. Worker

pnpm --filter @workspace/cli worker

The worker is a long-running process that picks up jobs in FIFO order, runs the handler, and retries with exponential backoff on failure.

What's next

  • Add observability — track job duration and retry rate.
  • Production readiness checklist — verify queue depth alarms before going live.

Similar guides

  • 2026-08-12

    Deploy to Vercel

    Connect your repo, configure environments, and run your first production build.
    vercelproductionci-cd
    David PereiraChief Executive Officer
    2 min read
  • 2026-07-22

    Build your first agent stack

    Compose an AI agent with the SDK, a tool registry, and a streaming endpoint.
    aillmrag
    David PereiraChief Executive Officer
    1 min read

Ready to ship?

Read more, or ship with us.

Subscribe to the blog and changelog feeds, install the CLI to scaffold a project in under five minutes, or talk to our delivery team if you need a hand. Same templates, same contracts, same guarantees.

Install the CLIBrowse the registry