# How to cancel script console execution

**URL:** <https://forum.inductiveautomation.com/t/how-to-cancel-script-console-execution/19591>\
**Category:** General Discussion\
**Created:** [September 7, 2018, 9:06pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-script-console-execution/19591 "2018-09-07T21:06:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cezipper](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@cezipper](https://forum.inductiveautomation.com/u/cezipper)\
**Post date:** [September 7, 2018, 9:06pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-script-console-execution/19591/1 "2018-09-07T21:06:58Z")

</div>

I started a script console that has an infinite loop. Is there any way to cancel execution other than closing designer? The execute button stays pressed and if I close and reopen the console, it is still running.

---

<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 7, 2018, 9:10pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-script-console-execution/19591/2 "2018-09-07T21:10:08Z")

</div>

There is not - there’s no way to interrupt the thread that’s running.

---

<div class="post-metadata">

**Author:** ![StefanGronberg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stefangronberg/32/6288_2.png) [@StefanGronberg](https://forum.inductiveautomation.com/u/StefanGronberg)\
**Post date:** [September 11, 2018, 11:23am UTC](https://forum.inductiveautomation.com/t/how-to-cancel-script-console-execution/19591/3 "2018-09-11T11:23:40Z")

</div>

Even super old VBA/VBS can be interrupted in infinite loops. I think its wierd that ignition/Jython does not have this safe guard to force cancel a loop or struck process without having to kill the whole computer.

---

<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 11, 2018, 12:34pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-script-console-execution/19591/4 "2018-09-11T12:34:38Z")

</div>

> [@StefanGronberg](#):
>
> without having to kill the whole computer.

Exaggerating for effect? You just have to kill the designer from your task manager.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [September 11, 2018, 2:41pm UTC](https://forum.inductiveautomation.com/t/how-to-cancel-script-console-execution/19591/5 "2018-09-11T14:41:59Z")

</div>

When I am testing loops I always put a conditional in it

```auto
i = 0
While i <=20000 and myOtherCondition:
     do whatever
     i+=1

```

20000 is just arbitrary, you can set it to whatever you want. Can even do a check on a boolean tag, then have a client open with a button for the boolean while testing loops in the designer
