History
Every run is recorded in the store. Any instance can read that record, including a process that doesn’t run jobs at all.
history(name, limit?), HistoryAsync(name, limit)
Section titled “history(name, limit?), HistoryAsync(name, limit)”Returns the latest runs of a job from all instances, newest first. limit is 1 to 10000 and defaults to 20.
There is one record per attempt. A run that was taken over shows twice: the attempt that didn’t finish, and the one that did.
Reading history works for any job name, even one not registered on this instance, and connects on its own if the scheduler hasn’t started.
The run record
Section titled “The run record”| Node.js | .NET (RunRecord) |
Meaning |
|---|---|---|
job |
Job |
The job’s name |
slot |
Slot |
Scheduled time, ms since 1970 |
scheduledAt |
ScheduledAt |
The slot as a Date (DateTimeOffset) |
instanceId |
InstanceId |
Who ran this attempt |
attempt |
Attempt |
1, or 2 and up when a backup took over |
reason |
Reason |
scheduled, manual, catch-up or takeover |
manual |
IsManual |
true for a manual run |
status |
Status |
See below |
startedAt |
StartedAt |
When the instance claimed and started it |
finishedAt |
FinishedAt |
When it ended. Missing (null) while it runs |
durationMs |
Duration (TimeSpan?) |
Missing while it runs |
error |
Error |
The error message, when the status is failed |
Status
Section titled “Status”| Node.js | .NET (RunStatus) |
Meaning |
|---|---|---|
running |
Running |
In progress |
success |
Success |
The handler returned |
failed |
Failed |
The handler threw or timed out |
interrupted |
Interrupted |
The attempt didn’t finish: its runner died or froze, lost the run to a backup, or was stopped |
lastRun(name), LastRunAsync(name)
Section titled “lastRun(name), LastRunAsync(name)”The most recent attempt, or null if the job never ran.
nextRun(name), GetNextRun(name)
Section titled “nextRun(name), GetNextRun(name)”When a registered job is next due, as a Date (DateTimeOffset?), or null if there are no more runs (a one-off job in the past). The run starts up to one jitter later, on whichever instance claims it.
It throws if the job isn’t registered on this instance.
jobs(), GetJobs()
Section titled “jobs(), GetJobs()”The jobs registered on this instance (JobInfo records in .NET).
| name | type | schedule | nextRunAt | runningHere |
|---|---|---|---|---|
| sync | every | every 10s | 2026-10-10T12:00:10.000Z | 0 |
| digest | cron | cron “0 8 * * 1-5” (Europe/Athens) | 2026-10-12T05:00:00.000Z | 0 |
runningHere (RunningHere) is how many runs of that job this instance is executing right now.
A read-only process
Section titled “A read-only process”A dashboard or admin API doesn’t have to run jobs. Create a scheduler pointing at the same store, register nothing, and read:
It must use the same store, and the same prefix or table, as the instances that run the jobs.
Health checks
Section titled “Health checks”Checking the store rather than local state means the check passes on every instance as long as some instance is running the job, which is what you want behind a load balancer.
How much is kept
Section titled “How much is kept”The history size (historySize, HistorySize; default 1000 runs per job) and age limit (historyTtlMs, HistoryTtl; no limit by default) control what is kept. Both are job options with scheduler-wide defaults.
Where it is kept depends on the backend:
| Backend | Where history lives |
|---|---|
| Redis / Valkey | A stream of claims and a sorted set of results, per job |
| PostgreSQL / SQLite | The <table>_attempts table |
| RabbitMQ | A stream queue per job |
| NATS | The JetStream stream, on the job’s subjects |
- Events and logging
- Express and ASP.NET Core recipes: history behind an HTTP API