# How to cancel gateway script?

**URL:** <https://forum.inductiveautomation.com/t/how-to-cancel-gateway-script/64712>\
**Category:** Ignition\
**Created:** [September 30, 2022, 3:26pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-gateway-script/64712 "2022-09-30T15:26:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Mor](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@Dan\_Mor](https://forum.inductiveautomation.com/u/Dan_Mor)\
**Post date:** [September 30, 2022, 3:26pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-gateway-script/64712/1 "2022-09-30T15:26:54Z")

</div>

Hi, how do I cancel a script that is running on the gateway? I accidentally created an infinite loop and is consuming all memory, everything is unresponsive. What do I do?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 30, 2022, 3:33pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-gateway-script/64712/2 "2022-09-30T15:33:06Z")

</div>

Restart the gateway.

---

<div class="post-metadata">

**Author:** ![Dan\_Mor](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@Dan\_Mor](https://forum.inductiveautomation.com/u/Dan_Mor)\
**Post date:** [September 30, 2022, 3:52pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-gateway-script/64712/3 "2022-09-30T15:52:45Z")

</div>

Thanks for the response, the script is on gateway startup, what do I do after clicking restart gateway? Does it give me time to enter the designer and publish the script fixed?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 30, 2022, 3:55pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-gateway-script/64712/4 "2022-09-30T15:55:05Z")

</div>

Are you on an 8.X version of Ignition?

You can go into the filesystem and mark the project in question disabled; that will prevent the startup script from running.

Navigate to wherever Ignition is installed, then find the `data/projects` folder. Open the folder with the name of your project, then open the `project.json` file. Change the enabled key from `true` to `false`, save the file, then restart your gateway.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 30, 2022, 5:36pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-gateway-script/64712/7 "2022-09-30T17:36:05Z")

</div>

You will almost certainly have to restart the gateway to kill off the last remnants.
