Capy-Bearer Documentation

job_cancel

host call

Capy

function job_cancel(job : dval) bool

Description

job_cancel() requests cancellation of a job. A canceled job reports the cancelled state.

Parameters

job : a job ID as dval

Return Values

true when the system cancels an active job. Otherwise, false.

Example

Capy

var job := shell_exec("sleep 5", {background: true, timeout_ms: 10000})
print(job_cancel(job), "\n")