space.schedule.get()
Read one job by its ID.
Reads one job by its ID.
function get(id: string, options?: CallOptions): Promise<Job>Parameters
idstringThe job’s ID: 26 lowercase letters and digits.
options.signalAbortSignalCancels the call.
options.timeoutMsnumberHow long the call may take, in milliseconds. The
timeoutMsset increateSpacewhen you leave it out, 30,000 by default.
Returns
A promise of the job.
The call is sent again, up to retries times, when it fails in a way that may pass, such as a network failure or 503.
Errors
| Code | When |
|---|---|
validation_failed | id is not a job ID |
not_found | The project has no job with that ID |
Every call can also fail with the codes shared by all of space, such as missing_project or network_error. See SpaceError.
Example
import { space } from "digitospace"
const job = await space.schedule.get("01m3c081d2wj4g63qcr53pa1yh")
console.log(job.name, job.state, job.nextRunAt)Last updated