<?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: Script using Python API and Windows task scheduler in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066021#M61317</link>
    <description>&lt;P&gt;The script works. What I can't do is make it work in Windows task scheduler to run after hours.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jun 2021 14:57:58 GMT</pubDate>
    <dc:creator>AliciaShyu</dc:creator>
    <dc:date>2021-06-08T14:57:58Z</dc:date>
    <item>
      <title>Script using Python API and Windows task scheduler</title>
      <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066013#M61314</link>
      <description>&lt;P&gt;I have a script that uses the Python API to logging into the server, stop geocode services, rebuild locators and start services.&lt;/P&gt;&lt;P&gt;Is there a way to use Windows task scheduler to run this script. I've tried this&amp;nbsp;&lt;A title="Schedule a Python Script using Windows Task Scheduler" href="https://community.esri.com/t5/python-documents/schedule-a-python-script-using-windows-task-scheduler/ta-p/915861" target="_blank" rel="noopener"&gt;Schedule a Python Script using Windows Task Scheduler&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A title="Run stand-alone scripts" href="https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/using-conda-with-arcgis-pro.htm" target="_self"&gt;Run stand-alone scripts&lt;/A&gt;&amp;nbsp;without success.&lt;/P&gt;&lt;P&gt;Edited: I'm using Windows task scheduler on our server machine where other python scripts work correctly in the task scheduler.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 15:14:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066013#M61314</guid>
      <dc:creator>AliciaShyu</dc:creator>
      <dc:date>2021-06-08T15:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script using Python API and Windows task scheduler</title>
      <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066018#M61315</link>
      <description>&lt;P&gt;My bet is you are trying to use Windows Task Scheduler on a desktop machine with windows 10.&amp;nbsp; I've never been able to get Task Scheduler to work in that situation; I've only been successful running scheduled tasks on a dedicated server.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 14:53:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066018#M61315</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-06-08T14:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Script using Python API and Windows task scheduler</title>
      <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066020#M61316</link>
      <description>&lt;P&gt;You should be able to.&amp;nbsp; I am doing the exact same thing with Anaconda on my local desktop machine.&amp;nbsp; My Python script does the following.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Stop Locator Service on ArcGIS Server&lt;/LI&gt;&lt;LI&gt;Rebuild locator&lt;/LI&gt;&lt;LI&gt;Start Locator Service on ArcGIS Server&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Jim L.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 14:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066020#M61316</guid>
      <dc:creator>Hibby</dc:creator>
      <dc:date>2021-06-08T14:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Script using Python API and Windows task scheduler</title>
      <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066021#M61317</link>
      <description>&lt;P&gt;The script works. What I can't do is make it work in Windows task scheduler to run after hours.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 14:57:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066021#M61317</guid>
      <dc:creator>AliciaShyu</dc:creator>
      <dc:date>2021-06-08T14:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script using Python API and Windows task scheduler</title>
      <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066031#M61318</link>
      <description>&lt;P&gt;I'm assuming you are leaving your machine on.&amp;nbsp; Try running with the following options enabled:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;General tab: Run whether user is logged on or not&lt;/LI&gt;&lt;LI&gt;General tab: Run with highest privileges&lt;/LI&gt;&lt;LI&gt;General tab: Configure for: &amp;lt;your_operating_system&amp;gt;&lt;/LI&gt;&lt;LI&gt;Conditions tab: Power -&amp;gt; Wake the computer to run this task&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Do you have your Actions setup correctly?&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Program/script: should reference location of your python.exe&lt;/LI&gt;&lt;LI&gt;Add arguments (optional): should be name of python script&lt;/LI&gt;&lt;LI&gt;Start in (optional): location of your python script.&amp;nbsp; I use a UNC&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 15:08:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066031#M61318</guid>
      <dc:creator>Hibby</dc:creator>
      <dc:date>2021-06-08T15:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: Script using Python API and Windows task scheduler</title>
      <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066078#M61319</link>
      <description>&lt;P&gt;Are you running a bat file that calls multiple python scripts or are all the operations done in 1 python script (stop geocode service, rebuild locator, start geocode service)?&amp;nbsp; I currently have the Windows Task Scheduler setup to stop geocode services from a Windows 10 desktop, but it only worked the first time I ran it automatically and now it no longer executes the python script automatically so the rebuild address locator fails since there is still a lock on the address locator from the service that did not get stopped.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 16:41:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066078#M61319</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2021-06-08T16:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Script using Python API and Windows task scheduler</title>
      <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066100#M61320</link>
      <description>&lt;P data-unlink="true"&gt;I'm using one python script and Pro's propy.bat file per ESRI's documentation here&amp;nbsp;&lt;A title="Run stand-alone scripts" href="https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/using-conda-with-arcgis-pro.htm" target="_blank" rel="noopener"&gt;Run stand-alone scripts&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;I have also tried using the python.exe file in&amp;nbsp;&lt;SPAN class="usertext"&gt;arcgispro-py3 without any success.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 17:27:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1066100#M61320</guid>
      <dc:creator>AliciaShyu</dc:creator>
      <dc:date>2021-06-08T17:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script using Python API and Windows task scheduler</title>
      <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1067011#M61326</link>
      <description>&lt;P data-unlink="true"&gt;There is a reference to a python script in the updated help topic for keeping your locator and geocode service updated with new data&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geocoding/keep-your-locator-up-to-date.htm#ESRI_SECTION1_12AA5C7DF3B44701B13DD015F6D1BA02" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/data/geocoding/keep-your-locator-up-to-date.htm#ESRI_SECTION1_12AA5C7DF3B44701B13DD015F6D1BA02&lt;/A&gt;. Perhaps try using the&amp;nbsp;&lt;A href="https://www.arcgis.com/home/item.html?id=54e8aab14f6e4c61b65b9dd9ab451503" target="_self"&gt;Updating Geocoding Services&lt;/A&gt;&amp;nbsp; script for the scheduled task.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 17:56:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1067011#M61326</guid>
      <dc:creator>ShanaBritt</dc:creator>
      <dc:date>2021-06-10T17:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Script using Python API and Windows task scheduler</title>
      <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1073279#M61509</link>
      <description>&lt;P&gt;I was able to add the script to task scheduler using the python.exe file in arcgispro-py-clone folder.&lt;/P&gt;&lt;P&gt;I have a clone folder because I had to install some python packages that are not part of Pro. Pro creates a clone folder when you install additional packages. The location of that folder is C:\Users\(user name)\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ProCloneFolder.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/17173i152D26E95F5EF622/image-size/large?v=v2&amp;amp;px=999" role="button" title="ProCloneFolder.png" alt="ProCloneFolder.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 16:32:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1073279#M61509</guid>
      <dc:creator>AliciaShyu</dc:creator>
      <dc:date>2021-06-28T16:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Script using Python API and Windows task scheduler</title>
      <link>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1158641#M64190</link>
      <description>&lt;P&gt;Alicia, I am trying to do the same thing. I have a working script in Python 2.7 and am trying to convert it to Python 3.7 and having problems. Would you be willing to post your working Python 3 script to stop geocoding service, rebuild locator, and start geocoding service?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 23:52:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-using-python-api-and-windows-task-scheduler/m-p/1158641#M64190</guid>
      <dc:creator>NathanRobbins1</dc:creator>
      <dc:date>2022-03-28T23:52:21Z</dc:date>
    </item>
  </channel>
</rss>

