# Stop execution from terminal

**URL:** <https://community.n8n.io/t/stop-execution-from-terminal/32464>\
**Category:** Questions\
**Tags:** wait, cli\
**Created:** [November 4, 2023, 9:32pm UTC](https://community.n8n.io/t/stop-execution-from-terminal/32464 "2023-11-04T21:32:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![illusionandcards](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/illusionandcards/32/26112_2.png) [@illusionandcards](https://community.n8n.io/u/illusionandcards)\
**Post date:** [November 4, 2023, 9:32pm UTC](https://community.n8n.io/t/stop-execution-from-terminal/32464/1 "2023-11-04T21:32:52Z")

</div>

Good day,

I have a workflow with a “code” node that has been using 100% of the CPU for a while, so I can’t access n8n.

I tried deactivating the workflow with the terminal using `docker exec -u node -it n8n-container n8n update:workflow --id=<ID> --active=false` but it’s not finishing the active execution.

Is there a way to solve this?

I don’t want to restart the container, as I have active workflows waiting for a specific date and they will fail.

Thank you.

PS: Is there a better way of testing these functions so they don’t use 100% of the CPU and block n8n?

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [November 7, 2023, 10:03am UTC](https://community.n8n.io/t/stop-execution-from-terminal/32464/3 "2023-11-07T10:03:36Z")

</div>

Hi @illusionandcards, I am afraid n8n does not have a CLI option to stop individual executions from running.

> I don’t want to restart the container, as I have active workflows waiting for a specific date and they will fail.

I am afraid restarting the container would be the suggested approach here. Workflows waiting for more than 65 seconds would be persisted to the database for the duration of the wait though, so these should still be available after the restart.

---

<div class="post-metadata">

**Author:** ![illusionandcards](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/illusionandcards/32/26112_2.png) [@illusionandcards](https://community.n8n.io/u/illusionandcards)\
**Post date:** [November 8, 2023, 7:43am UTC](https://community.n8n.io/t/stop-execution-from-terminal/32464/4 "2023-11-08T07:43:47Z")

</div>

Yes they persisted, so I had no problem when restarting the container. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [February 6, 2024, 7:44am UTC](https://community.n8n.io/t/stop-execution-from-terminal/32464/5 "2024-02-06T07:44:25Z")

</div>

Closed on February 6, 2024, 7:44am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
