Skip to main content
protected listSchedules(): Promise<TaskRecord[]>
List every pending task on this agent. Returns Promise<TaskRecord[]> One TaskRecord per pending task — id, method name, payload, next due time, recurrence, and retry counters.

TaskRecord

A persistent scheduled task, as returned by listSchedules(). Properties attempts
attempts: number
Consecutive failed deliveries so far; resets after a successful recurring run.
createdAt
createdAt: Date
When the task was first scheduled.
due
due: number
Epoch ms at which the task becomes due.
everyMs?
optional everyMs?: number
Recurrence interval in ms, if this is a repeating task.
id
id: string
The task id — random unless a stable id was supplied at scheduling time.
maxRetries
maxRetries: number
Retries allowed after the first delivery before the task is parked.
name
name: string
The method name the task will call when it fires (or the name handed to the onTask fallback if no such method exists).
payload?
optional payload?: unknown
Arbitrary payload. MUST be codec-safe (JSON-native + Date/Map/Set/ ArrayBuffer/TypedArray/Buffer/BigInt/RegExp) — it is stored via ctx.storage.put, which throws CodecError on functions, class instances, or circular refs.