RH Task Cancel
RH Task Cancel is the eject button for a cloud job that's going nowhere
- result
You queued a big video job on RunningHub's cloud, you see it churning, and you realize the prompt is wrong or the workflow is broken and you're burning credits by the minute. Local ComfyUI, you'd just stop the queue. Cloud ComfyUI, you need to tell someone on the other end to stop. RH Task Cancel is that someone: give it the task ID and your API key, and it calls RunningHub's /task/openapi/cancel endpoint to abort the run.
Because cloud time is billed time, this is genuinely one of the pack's most practical little nodes - every second a runaway job spends on a rented GPU is money you're spending on a result you're about to throw away.
What you set
Three required inputs, all strings:
api_key- your RunningHub API key.base_url-https://www.runninghub.cnby default; switch tohttps://www.runninghub.aifor the international platform.task_id- the task to cancel. Grab it from thetask_idoutput of RH Execute Workflow, RH Execute AI App, or any of the Model nodes before the job runs away from you.
Like the other Task nodes, credentials go straight on the node rather than through RH Settings' STRUCT config - the pack is consistent about that quirk.
Output
One output: result (STRING). The node returns a human-readable message - on success it's Task <id>: <msg> where <msg> comes from the API response, and on failure it's Cancel failed: <error>. If the key or task ID is missing you get Missing API key or task ID. It's an output node, so it shows its message right on the canvas.
How it behaves, and the caveats
The mechanics are simple: one HTTP call, no waiting, no polling. But two honest caveats from how it's built:
- It's fire-and-ask. It reports what the API said about canceling, but it doesn't verify the task actually stopped, and it doesn't wait for the cancel to take effect. If the cancel races a task that's about to finish, you may still get billed for the completed run.
- Cancels are not free of consequences downstream. If you cancel the job that some other part of your graph was waiting on, that downstream node will get a failed or empty result. Cancel is a deliberate "abort this branch" move, not a polite pause.
When you'd wire it in
It's an output node you'd typically trigger by hand when something's obviously stuck - queue it, look at the result message, move on. For a more automated "cancel on timeout" pattern you'd have to build the logic yourself, since this node has no conditionals; it just cancels what you point it at. Paired with RH Task Status (check if it's still running) it's a reasonable watchdog pair, though most people just reach for it the moment they spot a bad prompt mid-run.
Install
Part of the ComfyUI-RunningHub pack:
cd ComfyUI/custom_nodes/
git clone https://github.com/liangzheng1128/ComfyUI-RunningHub
cd ComfyUI-RunningHub
pip install -r requirements.txt
or ComfyUI Manager → search "RunningHub", then restart. Light dependencies - requests, websocket-client, Pillow, numpy.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| base_url | STRING | https://www.runninghub.cn | — |
| task_id | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | STRING | — |