Fernwood
A small, fast background job queue for Swift servers. Durable jobs on SQLite or Postgres, retries with backoff, and a dashboard you can actually read.
Tip
New here? The getting started guide has you running a worker in five minutes.
Install
Add Fernwood to your Package.swift:
.package(url: "https://example.com/fernwood.git", from: "2.4.0")
Usage
import Fernwood
struct SendReceipt: Job {
let orderID: UUID
func run(context: JobContext) async throws {
let order = try await context.db.order(orderID)
try await Mailer.send(.receipt(for: order))
}
}
try await queue.enqueue(SendReceipt(orderID: order.id), delay: .seconds(30))
Why Fernwood
| Fernwood | Cron + scripts | Hosted queue | |
|---|---|---|---|
| Survives restarts | ✅ | ❌ | ✅ |
| Retries with backoff | ✅ | ❌ | ✅ |
| Runs on your own DB | ✅ | ✅ | ❌ |
| Monthly bill | $0 | $0 | 💸 |
Features
- At-least-once delivery with idempotency keys
- Exponential backoff with jitter
- Cron-style recurring jobs
- Priority lanes (planned for 2.5)
License
MIT. See LICENSE.








