Halyard documentation
Background work, handled.
Everything you need to queue jobs, schedule recurring work and fan out events with Halyard: guides, API reference, SDKs and the CLI.
$ halyard jobs tail --queue allStreaming live jobs from production (us-east) … 14:02:11 succeeded job_3Rk9Tq7Xw2 send-welcome-email 182ms14:02:11 succeeded job_7Mp2Lc4Vn8 resize-avatar 641ms14:02:12 retrying job_9Qe1Hs6Zt3 sync-crm-contact attempt 2/514:02:12 running job_2Wd8Nf5Kb1 build-invoice-pdf14:02:13 queued job_5Xa4Rj9Pg6 send-welcome-email $ Quickstart
Start in 5 minutes
Queue a job, run a worker and watch it succeed. You only need an API key and a terminal.
- 1
Create a test key
Sign up and copy the key that starts with hy_test_. Test keys run in a sandbox and never bill.
30 seconds
- 2
Queue your first job
Send one request with a queue, a task name and a JSON payload. Halyard answers with the job's ID.
1 minute
- 3
Run a worker
Start halyard dev or an SDK worker. It picks up the job, runs your handler and reports the result.
3 minutes
curl https://api.halyard.example/v3/jobs \ -H "Authorization: Bearer hy_test_51Hq8Zx2rTmV9cKpL3d" \ -H "Content-Type: application/json" \ -d '{ "queue": "emails", "task": "send-welcome-email", "payload": { "user_id": "usr_8KfQ2" } }'import { Halyard, Worker } from "@halyard/node"; const halyard = new Halyard(process.env.HALYARD_KEY); // Queue the jobawait halyard.jobs.create({ queue: "emails", task: "send-welcome-email", payload: { user_id: "usr_8KfQ2" },}); // Handle it in your workerconst worker = new Worker(process.env.HALYARD_KEY, { queues: ["emails"] }); worker.task("send-welcome-email", async (job) => { await sendWelcome(job.payload.user_id);}); await worker.start();import osfrom halyard import Halyard, Worker halyard = Halyard(os.environ["HALYARD_KEY"]) # Queue the jobhalyard.jobs.create( queue="emails", task="send-welcome-email", payload={"user_id": "usr_8KfQ2"},) # Handle it in your workerworker = Worker(os.environ["HALYARD_KEY"], queues=["emails"]) @worker.task("send-welcome-email")def send_welcome_email(job): send_welcome(job.payload["user_id"]) worker.run()Explore
Everything Halyard runs
Six building blocks cover almost every kind of background work. Start with the one you need today.
Jobs
Queue work with one request and follow every attempt from queued to succeeded.
Queues
Named lanes with their own concurrency, priority and rate limits.
Events
Publish once and fan out to every service that subscribes, in order.
Schedules
Cron expressions with time zones for reports, cleanups and syncs.
Webhooks
Get a signed HTTP call when a job finishes, fails or lands in dead letters.
CLI
Run workers locally, tail live jobs and deploy schedules from your terminal.
SDKs
Official libraries
Typed clients and workers for the languages you already use. Every SDK covers the full v3 API.
Guides
Popular guides
- 01Send welcome emails in the backgroundJobs6 min
- 02Process image uploadsQueues9 min
- 03Fan out events to many servicesEvents8 min
- 04Build a nightly reportSchedules7 min
- 05Make jobs idempotentJobs5 min
API reference
A small, predictable REST API
https://api.halyard.example/v3JSON in, JSON out. Authenticate with a bearer key, retry safely with Idempotency-Key and page through lists with cursors. Open the reference.
Help
Stuck? We're around.
Real engineers answer support, and the status page is updated by the on-call team, not a bot.