Skip to the content.

Steady

Durable, resumable multi-step jobs on the Postgres you already have.

CI npm License: MIT Node 20+

Steady runs multi-step jobs that survive crashes, deploys and time. Write a flow as an async function; each step result is recorded once and replayed after any interruption, so finished work is not done again. Flows can sleep for days, wait for a signal from a person, retry with backoff, and run on a cron schedule. Everything lives in four tables in your Postgres. Any process that calls tick() every minute is enough: a serverless cron, a container loop, your laptop. No broker, no extra service, no vendor.

tick claims due runs, runs the next step and records it, then finishes or parks the run until a later tick

import { createSteady } from "@solustiq/steady"

const steady = createSteady({ db, tenant: "acme" }) // db: pgAdapter(pool), postgresAdapter(sql) or neonAdapter(url)

const onboarding = steady.defineFlow("onboarding", async (f, user: { email: string }) => {
  const account = await f.step("create-account", () => createAccount(user.email))
  await f.step("send-welcome", () => sendEmail(user.email, "welcome"))
  const verified = await f.waitForSignal("email-verified", { timeout: "3d" })
  if (!verified) await f.step("send-reminder", () => sendEmail(user.email, "reminder"))
  await f.sleep("7d")
  await f.step("send-tips", () => sendEmail(user.email, "tips"))
  return { accountId: account.id }
})

await steady.start(onboarding, { email: "ada@example.com" }, { key: "user-42" }) // key: an opaque id, never personal data
await steady.tick() // call this every minute: a cron route, a loop, a worker

When the user clicks the verification link, your handler calls steady.signal({ flow: onboarding, key: "user-42" }, "email-verified") and the next tick continues the flow. If the process dies anywhere in between, the next tick picks the run up from the last recorded step. This exact snippet is compiled and run by the test suite (src/readme-example.test.ts).

When to use it

When not to use it

How it compares

  Steady Temporal Inngest cron + database
What you run a library and your Postgres a cluster (server, history and matching services) plus workers a hosted service or its self-hosted server your cron and your tables
Resume after a crash from the last recorded step from the last recorded event from the last recorded step whatever you wrote by hand
Sleep for days, wait for a signal yes yes yes by hand, with state columns
Latency of a resume your tick interval (about a minute) near real time near real time your cron interval
Built for business processes at modest volume high volume, many services event-driven apps at high volume simple periodic jobs
Parallel steps inside one run no yes yes by hand
Changing flow code under live runs no versioning; a mismatch fails the run loudly versioning APIs step ids; changes need care n/a
Languages TypeScript many several any
Hosted dashboard no (history() and SQL) yes yes no
Where state lives your Postgres Temporal’s persistence store Inngest cloud, or its self-hosted server your tables

More detail and the reasoning behind each row: docs/comparison.md.

Install

npm install @solustiq/steady
# plus the driver you already use (optional peers):
npm install pg            # or: postgres, @neondatabase/serverless

Node 20 or newer. Zero runtime dependencies; the drivers are optional peer dependencies and are never bundled. ESM and CommonJS builds with type definitions.

Quick start

1. Connect and migrate. migrate() creates the four tables if they are missing and is safe to run on every boot (or apply sql/steady.sql with your migration tool).

import { Pool } from "pg"
import { createSteady } from "@solustiq/steady"
import { pgAdapter } from "@solustiq/steady/pg"

export const steady = createSteady({
  db: pgAdapter(new Pool({ connectionString: process.env.DATABASE_URL })),
  tenant: "acme",
})
await steady.migrate()

Other drivers: postgresAdapter(sql) from @solustiq/steady/postgres (postgres.js) and neonAdapter(process.env.DATABASE_URL!) from @solustiq/steady/neon (Neon serverless over HTTP).

2. Define flows. Every process that calls tick() must define every flow it should run; tick() only claims runs of flows defined on that instance.

export const dailyReport = steady.defineFlow("daily-report", async (f) => {
  const rows = await f.step("query", () => loadYesterday())
  await f.step("email", () => sendReport(rows), { retry: { maxAttempts: 5, backoffMs: 60_000 } })
})

3. Start runs, or schedule them.

await steady.start(dailyReport, undefined, { key: "report:2026-12-01" }) // idempotent per key
await steady.schedule(dailyReport, "0 7 * * 1-5", { tz: "Europe/Istanbul" }) // weekdays 07:00

4. Tick. Call tick() every minute from whatever you have. On Vercel, a cron route:

// app/api/steady/route.ts, with a Vercel cron on "* * * * *"
export async function GET(request: Request) {
  if (request.headers.get("authorization") !== `Bearer ${process.env.CRON_SECRET}`) {
    return new Response("unauthorized", { status: 401 })
  }
  const result = await steady.tick({ concurrency: 4 })
  return Response.json({ claimed: result.claimed, completed: result.completed, failed: result.failed })
}

In a container: setInterval(() => steady.tick().catch(console.error), 60_000). Many runners may tick at the same time; leases make sure each run executes in one place.

5. Look inside. steady.history(runId) returns the run and a timeline of every step attempt, park, log line and signal. steady.list({ status: "failed" }) finds dead letters; steady.retryNow(runId) re-opens one at the step that failed.

Guarantees, in plain words

The details, with the exact rules: docs/guarantees.md.

Security

Every query filters on the tenant of the instance, and a cross-tenant instance needs an explicit allowCrossTenant: true. Only flows registered with defineFlow can be started, scheduled or signalled; names and keys are validated and payloads have hard size limits (64 KB inputs and results, 16 KB signals) that reject oversize data instead of storing it. Values under secret-looking property names (password, token, apiKey, …) are redacted before anything is stored or emitted, errors are stored as Name: message without stack traces, and optional AES-256-GCM encryption at rest covers inputs, outputs, step results, signal payloads and schedule inputs. An optional script (sql/rls.sql) adds a least-privilege role, row-level security per tenant and an append-only step log. Steady has no network surface: your application authenticates whoever may call start, signal or cancel. Read docs/security.md and report vulnerabilities as described in SECURITY.md.

Documentation

Page What it covers
Concepts Flows, runs, steps, the journal, sleep, signals, schedules, once, tenancy, the tick
Guarantees What “exactly once” means here, failure cases, determinism, late signals, DST
API reference Every public function, option, type and error
Recipes Daily report, approval via an HTTP handler, retry with backoff, no-show handling, migrating from cron, sensitive step results
Operations Tick cadence, leases, many runners, retention, observability SQL, the RLS role
Security Threat model and the controls that address it
FAQ Short answers to common questions
Comparison Steady next to Temporal, Inngest and cron plus a table

Runnable samples live in examples/: a Vercel cron route, a Node loop, and an approval wait driven by an HTTP handler.

Also: CHANGELOG, CONTRIBUTING, CODE_OF_CONDUCT, SQL files.

License

MIT, Copyright (c) 2026 Solustiq.