<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to kill a notebook process in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1361892#M76475</link>
    <description>&lt;P&gt;Can confirm this is still an issue as of 3.1. Up late on a Sunday night waiting for it to unfreeze.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Dec 2023 02:05:25 GMT</pubDate>
    <dc:creator>KeithDesertspring</dc:creator>
    <dc:date>2023-12-18T02:05:25Z</dc:date>
    <item>
      <title>How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1118868#M48056</link>
      <description>&lt;P&gt;I've tried everything I can think of to kill a running notebook that is stuck in a loop and nothing works. The Interrupt Kernel button is always grayed out, tried restarting the kernel through the command prompt (P Key) but this doesnt seem to do anything either. The only way I've figured out how to stop the process is to kill the entire application in task manager.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 20:50:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1118868#M48056</guid>
      <dc:creator>ChrisCowin</dc:creator>
      <dc:date>2021-11-19T20:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1118889#M48063</link>
      <description>&lt;P&gt;In the task manager, can you see and kill the python process specifically? Still not a pretty solution, but perhaps better than killing the entire application.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 21:10:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1118889#M48063</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-11-19T21:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1118898#M48066</link>
      <description>&lt;P&gt;Also gave this a shot, but it doesn't work. The process doesn't stop the loop.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 21:22:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1118898#M48066</guid>
      <dc:creator>ChrisCowin</dc:creator>
      <dc:date>2021-11-19T21:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1118920#M48069</link>
      <description>&lt;P&gt;esc P&lt;/P&gt;&lt;P&gt;does it look like this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="restart_kernel1.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27962i8D09178FC6DFB968/image-size/large?v=v2&amp;amp;px=999" role="button" title="restart_kernel1.png" alt="restart_kernel1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 22:06:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1118920#M48069</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-11-19T22:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1119226#M48133</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;, Yeah I tried the "confirm restart kernel" and on the notebook it seemed like it stopped but the code was still selecting features after it was restarted.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 16:35:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1119226#M48133</guid>
      <dc:creator>ChrisCowin</dc:creator>
      <dc:date>2021-11-22T16:35:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1147806#M51969</link>
      <description>&lt;P&gt;Chris, did you ever figure this issue out?&amp;nbsp; I've got similar behavior.&amp;nbsp; My interrupt kernel button is always greyed out when the kernel is busy.&amp;nbsp; I've tried using the keyboard shortcut (I, I) as Dan recommended, and this does get rid of the asterisk next to a cell denoting that it's running, but the kernel itself doesn't stop, meaning I still can't run any other cells.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 23:56:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1147806#M51969</guid>
      <dc:creator>FFollett</dc:creator>
      <dc:date>2022-02-24T23:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1301688#M70464</link>
      <description>&lt;P&gt;I have been checking this thread for a while and it seems there is still no solution?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 18:18:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1301688#M70464</guid>
      <dc:creator>RBCopland</dc:creator>
      <dc:date>2023-06-21T18:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1361892#M76475</link>
      <description>&lt;P&gt;Can confirm this is still an issue as of 3.1. Up late on a Sunday night waiting for it to unfreeze.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 02:05:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1361892#M76475</guid>
      <dc:creator>KeithDesertspring</dc:creator>
      <dc:date>2023-12-18T02:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1410234#M81889</link>
      <description>&lt;P&gt;This might not be the solution you are looking for, but if you use the menu "Cell &amp;gt; Current Outputs &amp;gt; Clear" it interrupts the current process and resets the in-progress marker to ready to run again.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 14:14:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1410234#M81889</guid>
      <dc:creator>B_Brooks</dc:creator>
      <dc:date>2024-04-16T14:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1410269#M81892</link>
      <description>&lt;P&gt;There is also the interrupt Kernel button in the ribbon. I think this is even more effective and cutting off the process.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 14:50:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1410269#M81892</guid>
      <dc:creator>B_Brooks</dc:creator>
      <dc:date>2024-04-16T14:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1478537#M83749</link>
      <description>&lt;P&gt;In the notebook tab in the top banner you can click "interrupt kernel". I've done this a few times with success, unless ArcPro isn't responding at all, then I find this button can be greyed out.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edward33_0-1716570980572.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/105347iD144615C757F16A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edward33_0-1716570980572.png" alt="edward33_0-1716570980572.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 17:17:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1478537#M83749</guid>
      <dc:creator>edward33</dc:creator>
      <dc:date>2024-05-24T17:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1556527#M89899</link>
      <description>&lt;P&gt;You could run a command in CMD:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Taskkill /IM ArcGISPro.exe /F&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;It will instantly close ArcGIS PRO, with running Python too. You could save Notebook and Project when script is running, and then run the command.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 20:59:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1556527#M89899</guid>
      <dc:creator>EugeneSosnin_GSI</dc:creator>
      <dc:date>2024-11-07T20:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1559072#M90167</link>
      <description>&lt;P&gt;I am still experiencing this instability. Can we expect Esri to introduce reliable interrupt kernel functionality soon?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 07:05:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1559072#M90167</guid>
      <dc:creator>HenriBrillon</dc:creator>
      <dc:date>2024-11-15T07:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1573746#M91738</link>
      <description>&lt;P&gt;Me too. I run a notebook and it freezes and there is no way to unfreeze. Open and closing an application is not a legitimate solution to this problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interrupt kernel button is greyed out. Ending task does not work.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 21:21:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1573746#M91738</guid>
      <dc:creator>chris_del101</dc:creator>
      <dc:date>2025-01-08T21:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1576777#M92073</link>
      <description>&lt;P&gt;Running 3.4.0 still a problem for me.&amp;nbsp; For those screenshotting the ribbon, here is what it looks like no matter which window you have active during the process.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 14:40:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1576777#M92073</guid>
      <dc:creator>Kopczyknj_CDMSmith</dc:creator>
      <dc:date>2025-01-17T14:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1576786#M92074</link>
      <description>&lt;P&gt;OK, I made a little headway troubleshooting.&amp;nbsp; For me, I was copy/pasting paths from the catalog tab over to the python window.&amp;nbsp; I noticed if I did the path copy/paste from a text file that I create before running the script and NOT the catalog window (while the script was running) I was able to maintain the Kernel interruption option.&amp;nbsp; I'm sure this has something to do with lock file management but maybe it will help others.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 15:06:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1576786#M92074</guid>
      <dc:creator>Kopczyknj_CDMSmith</dc:creator>
      <dc:date>2025-01-17T15:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1606913#M95060</link>
      <description>&lt;P&gt;2025, and I am running into this issue as well. I am trying to write a notebook script that iterates through around 500 features with a searchcursor, and had to use task manager to end an accidental infinite loop.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffKaplan_Boston_0-1744902404235.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130450i5221F2F490BA6EC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffKaplan_Boston_0-1744902404235.png" alt="JeffKaplan_Boston_0-1744902404235.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The Interrupt Kernel button is greyed out for the whole time and the shortcut command doesn't do anything.&lt;BR /&gt;&lt;BR /&gt;I am working in ArcGIS Pro 3.3, it would be great to know if this is an active bug, has been fixed in a later release, or is something Esri is looking into.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 15:07:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1606913#M95060</guid>
      <dc:creator>JeffKaplan_Boston</dc:creator>
      <dc:date>2025-04-17T15:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1630172#M97045</link>
      <description>&lt;P&gt;2025 and running ArcGIS Pro 3.5.2 - the interrupt kernel button is still greyed out during certain operations requiring Task Manager to end the process for the whole project.&amp;nbsp; I've gotten into the habit of testing all my loops with a break at the end so I can evaluate the first result before setting it loose completely. It would still be nice to be able to stop the occasional accidental infinite loop or unexpectedly long process though.&amp;nbsp; Did come across this bug in searching for a solution though:&amp;nbsp;&lt;A href="https://support.esri.com/en-us/bug/when-using-arcgis-notebooks-in-arcgis-pro-interrupting-bug-000132278" target="_blank"&gt;https://support.esri.com/en-us/bug/when-using-arcgis-notebooks-in-arcgis-pro-interrupting-bug-000132278&lt;/A&gt;&amp;nbsp; Since the interrupt kernel button is in the ribbon, maybe the issue is related?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2025 21:35:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1630172#M97045</guid>
      <dc:creator>Melissa_B</dc:creator>
      <dc:date>2025-07-03T21:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1670062#M100548</link>
      <description>&lt;P&gt;Running 3.5.0, and still experiencing this issue in almost 2026! (Happy 4 year anniversary of this post &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 11:43:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1670062#M100548</guid>
      <dc:creator>OscarFitzpatrick</dc:creator>
      <dc:date>2025-12-03T11:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to kill a notebook process</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1694474#M102667</link>
      <description>&lt;P&gt;This is obviously not the desired solution and it's a bit ridiculous, but... it works.&lt;/P&gt;&lt;P&gt;While running an infinite while loop script in ArcGIS Pro, the only solution I came up with for stopping the script was creating a specific file in a specific folder and having the script check for its presence during the loop. If the file is present, the script halts.&lt;/P&gt;&lt;P&gt;I tried all the tips here and elsewhere without success. The thing is, the UI doesn't respond to any interaction during the script execution besides panning and zooming the map. So this is what I came up with, and although it is not perfect, it's way better than terminating the application—which, by the way, sometimes isn't even possible without forcing it via the Task Manager.&lt;/P&gt;&lt;P&gt;To make it a little more practical, I have a simple batch file in the same folder that creates the OINK.txt file, which I just double-click to stop the Python script. Other dynamics could be used to address this, just make sure you trigger the specific file that halts the script, or... wait for ESRI to fix this UI blocking issue.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import os
import time

# --- Setup Kill Switch (OINK) ---
# Gets the current directory where the script is running
current_folder = os.getcwd()
kill_file = os.path.join(current_folder, "OINK.txt")

# Clean up the file from previous runs, if it exists
if os.path.exists(kill_file):
    try:
        os.remove(kill_file)
    except Exception:
        pass

print(f"[SYSTEM] Process started.")
print(f"To gracefully stop the script, create an empty file named 'OINK.txt' in:")
print(f"-&amp;gt; {current_folder}\n")

# --- Execution ---
elapsed_seconds = 0
interval_seconds = 3

try:
    while True:
        # 1. Main task execution (e.g., printing the timer)
        print(f"Running... {elapsed_seconds} seconds have passed.")
        elapsed_seconds += interval_seconds

        # 2. The Kill Switch Logic
        # Breaks down the wait time into 1-second chunks to check for the file frequently
        stop_requested = False
        for _ in range(interval_seconds):
            if os.path.exists(kill_file):
                stop_requested = True
                break
            time.sleep(1)
            
        # 3. Break the infinite loop if the file is detected
        if stop_requested:
            print("\n[SYSTEM] OINK file detected! Executing ridiculous aborting operation...")
            break

    # 4. Clean exit and remove the trigger file
    if os.path.exists(kill_file):
        try:
            os.remove(kill_file)
        except Exception:
            pass
            
    print("[SYSTEM] Script terminated safely.")

except KeyboardInterrupt:
    print("\n[SYSTEM] Forced stop via keyboard (Ctrl+C).")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2026 22:19:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-kill-a-notebook-process/m-p/1694474#M102667</guid>
      <dc:creator>JorgeAntunes</dc:creator>
      <dc:date>2026-04-03T22:19:16Z</dc:date>
    </item>
  </channel>
</rss>

