Stop a background task
task_stopStops a running background task by sending SIGTERM to its process group, waiting a grace period, then forcing SIGKILL if it is still alive.
Instructions
Send a signal to the task process group, wait for the grace period, then force SIGKILL if it is still alive. Defaults to SIGTERM.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Task id. | |
| signal | No | Initial signal. Default SIGTERM. | |
| grace_ms | No | Grace period before SIGKILL. Default 3000. |