tasker is a durable http task queue service

Add persistent cron schedules with atomic task enqueueing #3

Merged kenneth.nym.sh
targeting main from feat/cron-schedules
Merged opened by and assigned to kenneth.nym.sh
targeting main from feat/cron-schedules

this pr adds cron scheduling, which allows tasks to be performed on a cron schedule.

example #

creating a schedule:

POST /schedules
Content-Type: application/json

{
  "cron": "0 9 * * *",
  "kind": "daily-report",
  "url": "https://example.com/workers/report",
  "input": {"team": "operations"},
  "dispatchDeadline": "30s"
}

response:

HTTP/1.1 201 Created
Location: /schedules/cm12345670000abcd1234efghi
Content-Type: application/json

{
  "id": "cm12345670000abcd1234efghi",
  "cron": "0 9 * * *",
  "kind": "daily-report",
  "url": "https://example.com/workers/report",
  "input": {"team": "operations"},
  "dispatchDeadline": "30s",
  "maxAttempts": 5,
  "enabled": true,
  "nextRunAt": "2026-11-01T09:00:00Z",
  "createdAt": "2026-10-31T12:00:00Z",
  "updatedAt": "2026-10-31T12:00:00Z"
}

the schedule is stored in a new table. the scheduler scans for due schedules every second. within each loop, it schedules any due task into the normal job table, then wakes up the dispatcher, just like the normal task creation path.

Commits 0