Durable by default
Every job is committed before it starts. Deploys, network partitions and that one aggressive autoscaler cannot make it disappear.
$ npx nightshift init --sleep
Durable background jobs, cron and queues for teams who would rather not be paged at 3am. One binary, zero ceremony, and a queue that remembers what it was doing.
$ brew install nightshift
18 MB · no dependencies · MIT licensed
1import { job } from "@nightshift/core"
2
3export const sendReceipt = job({
4 name: "receipts.send",
5 retries: 5,
6 backoff: "exponential",
7 timeout: "30s",
8 concurrency: 50,
9}, async ({ orderId }) => {
10 const receipt = await buildReceipt(orderId)
11 await mailer.send(receipt)
12 return { delivered: true }
13})
Six decisions we already made so you don't have to. Boring where it matters, sharp where it counts.
Every job is committed before it starts. Deploys, network partitions and that one aggressive autoscaler cannot make it disappear.
IANA timezones, DST, jitter and overlap protection. Your 2am report stays at 2am, wherever the server thinks it lives.
Exponential backoff, jitter, dead-letter queues and one-click replay. Retry the things that deserve it, not the things that don't.
Logs, spans, attempts and the exact payload that caused the problem — searchable by job, user or trace ID.
One million concurrent workers, backpressure all the way down, and no cron server to keep alive on a Sunday.
Cloud, your VPC, or a laptop on a train. One static binary, no runtime, no external dependencies, no lock-in.
Define a job in the language you already use. Nightshift handles the queue, the retries, the schedule and the part where you get woken up at 3am.
$ nightshift dev
1import { job } from "@nightshift/core"
2
3export const sendReceipt = job({
4 name: "receipts.send",
5 retries: 5,
6 backoff: "exponential",
7 timeout: "30s",
8 concurrency: 50,
9}, async ({ orderId }) => {
10 const receipt = await buildReceipt(orderId)
11 await mailer.send(receipt)
12 return { delivered: true }
13})
1from nightshift import job
2
3@job("receipts.send", retries=5,
4 backoff="exponential", timeout="30s")
5async def send_receipt(order_id: str):
6 receipt = await build_receipt(order_id)
7 await mailer.send(receipt)
8 return {"delivered": True}
1package jobs
2
3import "github.com/nightshift/core"
4
5var SendReceipt = core.Job("receipts.send",
6 core.Options{
7 Retries: 5,
8 Backoff: core.Exponential,
9 Timeout: 30 * time.Second,
10 }, func(ctx context.Context, orderID string) error {
11 receipt, err := buildReceipt(ctx, orderID)
12 if err != nil { return err }
13 return mailer.Send(ctx, receipt)
14})
Uptime is a feature. We measure it out loud, publish it, and never hide a bad afternoon.
We deleted four thousand lines of queue code. The pager hasn't gone off since. I'm not sure what to do with my evenings now.
No per-seat surprises, no egress maths. Start free, grow when you need to. Cancel with one command.
For side projects, prototypes and the things you ship at 2am for fun.
no card required
For teams with real queues, real users and a real need to sleep.
cancel with `nightshift down`
For lots of jobs, strict residency, or a very particular compliance team.
hello@nightshift.dev
We'll wake you if something actually breaks. Not before.
$ npm i -g @nightshift/cli
Free for 10,000 jobs a month · no card