<?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: Execute a scheduled python script and suppress the command window in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/execute-a-scheduled-python-script-and-suppress-the/m-p/690357#M53521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did, but no workee for me-me...&amp;nbsp; &amp;nbsp;I'll try again though...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(moments later)&lt;/P&gt;&lt;P&gt;Initially, it did the same thing, but I hadn't renamed my python script to .pyw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I've renamed it to .pyw and all I get is a flash...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sigh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Dec 2018 20:39:36 GMT</pubDate>
    <dc:creator>JoeBorgione</dc:creator>
    <dc:date>2018-12-28T20:39:36Z</dc:date>
    <item>
      <title>Execute a scheduled python script and suppress the command window</title>
      <link>https://community.esri.com/t5/python-questions/execute-a-scheduled-python-script-and-suppress-the/m-p/690355#M53519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The windows 10 task scheduler has deprecated the use of pop ups.&amp;nbsp; I have written a couple of tkinter message windows that I'd like to schedule to appear on my desktop.&amp;nbsp; They work fine, but when I run them as a scheduled task, the python window appears as well as the tkinter message.&amp;nbsp; I'd like just to see the message and no python window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://datatofish.com/python-script-windows-scheduler/" title="https://datatofish.com/python-script-windows-scheduler/" rel="nofollow noopener noreferrer" target="_blank"&gt;How to Execute Python Script using Windows Scheduler - Data to Fish&lt;/A&gt;&amp;nbsp; provides a step by step how-to wrap a python script in a .bat file; doesn't seem to work for me, and I wonder if it's a windows 10 thing?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bottom line; does anyone know how to execute a python script as a scheduled task to open a message on the desktop without a python command window as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My .bat file:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;@echo off

&lt;SPAN class="string token"&gt;"C:\Users\JBorgione\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\python.exe"&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"J:\PythonDevelopment\PopUps\GetUpReminder3.x.py"&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The actual tkinter message script:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; tkinter
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; tkinter &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; messagebox
 
&lt;SPAN class="comment token"&gt;# hide main window&lt;/SPAN&gt;
root &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; tkinter&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Tk&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
root&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;withdraw&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 
&lt;SPAN class="comment token"&gt;# message box display&lt;/SPAN&gt;
messagebox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;showinfo&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Movement"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Get Up and Take a Walk"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;the results:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/432356_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried to run it with windows 2.7python and both 2.7 and 3.x pythonw.exe to no avail....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:03:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/execute-a-scheduled-python-script-and-suppress-the/m-p/690355#M53519</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-12T05:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a scheduled python script and suppress the command window</title>
      <link>https://community.esri.com/t5/python-questions/execute-a-scheduled-python-script-and-suppress-the/m-p/690356#M53520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #669900; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;pythonw.exe &lt;/SPAN&gt;instead of &lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #669900; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-shadow: 0px 1px #fff; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;python.exe&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2018 20:19:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/execute-a-scheduled-python-script-and-suppress-the/m-p/690356#M53520</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-12-28T20:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a scheduled python script and suppress the command window</title>
      <link>https://community.esri.com/t5/python-questions/execute-a-scheduled-python-script-and-suppress-the/m-p/690357#M53521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did, but no workee for me-me...&amp;nbsp; &amp;nbsp;I'll try again though...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(moments later)&lt;/P&gt;&lt;P&gt;Initially, it did the same thing, but I hadn't renamed my python script to .pyw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I've renamed it to .pyw and all I get is a flash...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sigh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2018 20:39:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/execute-a-scheduled-python-script-and-suppress-the/m-p/690357#M53521</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2018-12-28T20:39:36Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a scheduled python script and suppress the command window</title>
      <link>https://community.esri.com/t5/python-questions/execute-a-scheduled-python-script-and-suppress-the/m-p/690358#M53522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried start /b in your .bat file?&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.windows-commandline.com/cmd-start-command/" title="https://www.windows-commandline.com/cmd-start-command/"&gt;https://www.windows-commandline.com/cmd-start-command/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 08:41:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/execute-a-scheduled-python-script-and-suppress-the/m-p/690358#M53522</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2019-01-03T08:41:06Z</dc:date>
    </item>
  </channel>
</rss>

