Skip to content
Français

Automate your runs

Choose CI, queues, schedules or webhooks to start work without an interactive session.

A worker process registers the handlers it knows and runs one job at a time until its signal aborts. Producers never send code, only a handler name and JSON input.

import { createSqliteTaskQueue, runQueueWorker } from "@elie-laloum/outpost";

const queue = await createSqliteTaskQueue(".outpost/jobs.sqlite");
const stop = new AbortController();
process.once("SIGINT", () => stop.abort());
try {
  await runQueueWorker({
    queue,
    worker: "worker-1",
    signal: stop.signal,
    handlers: {
      count: (input) => ({ value: Array.isArray(input) ? input.length : 0 }),
    },
  });
} finally {
  queue.close();
}

Wrap the workflow itself in defineWorkflowJob() to get a checkpointed run per job, keyed by the job’s runId. Schedules and webhooks publish into the same queue, so the worker is the only process that runs agents.

Starts a runUseKeeps running
A commit or a pipeline stageRun in CIOnly for the length of the job
Your own code or a serviceJob queuesWorkers you operate
The clockCron schedulesA scheduler plus workers
An event from GitHub, GitLab or SlackWebhooksAn HTTP server plus workers

Triggers never run a workflow inside the request or timer that fired them. They publish a deterministic job, so a redelivery, a restart or a second replica converges on one run.

  • Job inputs and values are JSON, up to 256 KiB each; one job at a time per runId.
  • A queue fences stale leases, but external effects are exactly-once only if the service you call deduplicates your idempotency key.
  • A webhook source verifies the signature before parsing and fails closed; a verified sender is not an approval, so gates still need their own actor.
  • A skipped daylight-saving slot does not fire, a repeated one fires once, and only the latest slot within maxLateMs is caught up.
  • An unattended run with no person watching still needs a budget: pair it with quota pauses and budgets.

API: runQueueWorker · createSqliteTaskQueue · TaskQueue · defineWorkflowJob · createCronSchedule · runSchedules · serveTriggers · createGithubWebhook.