Instance methods
TriggerClient: getRuns() instance method
The getRuns()
method gets runs for a Job.
The runs are returned with the newest first. You can pass in a cursor to get more.
Parameters
jobIdrequired
string
The Job ID you want to get runs for
cursor
string
You can use this to get more runs, if there are more than are returned in a single batch.
take
Default: 20number
How many runs you want to return in one go, max 50.
Returns
runs
Run[]
The runs
id
string | undefined
The id of the run
status
RunStatus | undefined
The status of the run. Can be one of the following: PENDING
, CANCELED
,
SUCCESS
, QUEUED
, WAITING_ON_CONNECTIONS
, PREPROCESSING
, STARTED
,
FAILURE
, TIMED_OUT
, ABORTED
startedAt
Date | undefined
The time the run started
completedAt
Date | undefined
The time the run completed
nextCursor
string | undefined
If there are more runs, you can use this to get them
// jobs/myJobs.ts
client.defineJob({
id: "my-job",
...
});
// someFile.ts
...
const runs = await client.getRuns("my-job");
...
Was this page helpful?
// jobs/myJobs.ts
client.defineJob({
id: "my-job",
...
});
// someFile.ts
...
const runs = await client.getRuns("my-job");
...