
Background jobs start simple and end up as a pile of queues, cron entries, and retry tables. Durable workflows replace that pile with plain code: you write the steps in order, and the platform makes sure each one runs to completion, even when a deploy or a crash interrupts it.
Durable workflows are generally available today on every plan.
How a workflow runs
A workflow is a function made of named steps. When a step finishes, its result is saved as a checkpoint. If the process stops, the next run skips every finished step and continues from the last checkpoint, with the same inputs.
import { workflow, step } from "@cloud/workflows";
export default workflow("send-invoices", async () => {
const accounts = await step("load", () => loadAccounts());
const invoices = await step("render", () => renderInvoices(accounts));
await step("send", { retries: 5, timeout: "2m" }, () => sendAll(invoices));
});Steps should be safe to retry. A good rule is to make each step write its result in one place, with an idempotency key, so a retry never sends the same invoice twice.
Start one from your app
Workflows start from an API call, a schedule, or another workflow. The call returns a run id right away, so your request handler never waits on the work itself.
import { workflows } from "@cloud/sdk";
const run = await workflows.start("send-invoices", { month: "2026-10" });
console.log(run.id); // wf_run_8f2c...Debug a failed run
Every run has a timeline in the dashboard with the input, output, duration, and logs of each step. When a step fails after its last retry, the run pauses instead of disappearing. Fix the bug, deploy, and replay the run from the failed step.
cloud workflows replay wf_run_8f2c --from sendLimits and pricing
Workflows are billed as regular compute. Checkpoints and replays are included. A single run can last up to 30 days, and a step can return up to 1 MB of data. See the changelog for the full list of limits.
Written by
Maya Chen
Product lead, Workflows
Maya leads the workflows team and writes about background jobs, retries, and the product decisions behind each release.


