Skip to main content

B9. Need background jobs

What this page helps you do​

Recognize when you need a queue or worker setup instead of forcing everything into the web request.

Why it matters​

Slow work in the main request can make an app feel broken even when the code is “working.”

You should already have​

  • long-running tasks such as uploads, AI jobs, emails, or report generation

Skip this page if​

  • the app responds quickly and does not need delayed work

What to do​

  • identify long-running tasks
  • choose where workers run
  • log failures and retries clearly

Keep the first background-job setup simple and observable.

Common mistakes​

  • doing expensive work in the request path
  • having no retry or failure visibility
  • forgetting worker-specific environment settings

Next step​

Go to P3. AI app path or H1. Choose hosting.

Advanced notes​

TODO for contributors: add beginner-friendly examples for cron jobs, queues, and one-off workers.