# How can I cancel a task if I didn't save the object\_ref?

**URL:** https://discuss.ray.io/t/how-can-i-cancel-a-task-if-i-didnt-save-the-object-ref/7162
**Category:** Ray Core
**Created:** [August 11, 2022, 12:50pm UTC](https://discuss.ray.io/t/how-can-i-cancel-a-task-if-i-didnt-save-the-object-ref/7162 "2022-08-11T12:50:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![biello](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/biello/32/2763_2.png) [@biello](https://discuss.ray.io/u/biello)
#### Post date: [August 11, 2022, 12:50pm UTC](https://discuss.ray.io/t/how-can-i-cancel-a-task-if-i-didnt-save-the-object-ref/7162/1 "2022-08-11T12:50:57Z")

</div>

**How severe does this issue affect your experience of using Ray?**

- Medium: It contributes to significant difficulty to complete my task, but I can work around it.

as title

---

<div class="post-metadata">

### Author: ![jjyao](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/jjyao/32/1799_2.png) [@jjyao](https://discuss.ray.io/u/jjyao)
#### Post date: [August 11, 2022, 3:32pm UTC](https://discuss.ray.io/t/how-can-i-cancel-a-task-if-i-didnt-save-the-object-ref/7162/2 "2022-08-11T15:32:06Z")

</div>

You cannot. You need to use the returned object ref to cancel the task.

---

<div class="post-metadata">

### Author: ![npuichigo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/npuichigo/32/5608_2.png) [@npuichigo](https://discuss.ray.io/u/npuichigo)
#### Post date: [January 15, 2024, 1:16pm UTC](https://discuss.ray.io/t/how-can-i-cancel-a-task-if-i-didnt-save-the-object-ref/7162/3 "2024-01-15T13:16:51Z")

</div>

why it’s not implemented? For example in command line just to cancel a task with specific task id.
