schedule.list
The schedules, with the next time and the last run of each
CLI- Package
- @procedures/schedule · README
- Path
["schedule","list"]- CLI
mark schedule list- As data
{"$proc":["schedule","list"],"input":{}}- Tags
- schedule, cron
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/schedule/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["schedule","list"], {});
console.log(JSON.stringify(result));From the command line
$ mark schedule list
As data, in a program
{ "$proc": ["schedule", "list"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
program | string | no | Only the schedules of this program |
Output
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
schedules | object[] | yes | The schedules, sorted by name |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"program": {
"description": "Only the schedules of this program",
"type": "string",
"maxLength": 500,
"pattern": "^[^.\\s]+(\\.[^.\\s]+)*$"
}
}
},
"output": {
"type": "object",
"properties": {
"schedules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"cron": {
"type": "string"
},
"program": {
"type": "string"
},
"input": {},
"timeZone": {
"type": "string",
"description": "The time zone: utc, local or an IANA name"
},
"createdAt": {
"type": "number",
"description": "When the schedule was added, in milliseconds since 1970"
},
"capability": {
"description": "The capability of the caller that added it: its clearance and its permitted effects"
},
"lastRun": {
"description": "The last run",
"type": "object",
"properties": {
"startedAt": {
"type": "number",
"description": "The start, in milliseconds since 1970"
},
"durationMs": {
"type": "number"
},
"outcome": {
"type": "string",
"enum": [
"success",
"failure"
]
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"message"
],
"additionalProperties": false
}
},
"required": [
"startedAt",
"durationMs",
"outcome"
],
"additionalProperties": false
},
"runs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"failures": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"skipped": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "The times that came during a run: no second run started"
},
"nextRunAt": {
"description": "The next time as an ISO text, or null",
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"cron",
"program",
"timeZone",
"createdAt",
"runs",
"failures",
"skipped",
"nextRunAt"
],
"additionalProperties": false
},
"description": "The schedules, sorted by name"
}
},
"required": [
"schedules"
],
"additionalProperties": false
}
}