<?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: Run Python API script as scheduled task? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753330#M323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The script can be run as a genera scheduled task using Task Scheduler on Windows and cron on Linux.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could follow the blog post at&amp;nbsp;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/product/analytics/scheduling-a-python-script-or-model-to-run-at-a-prescribed-time/?rmedium=redirect&amp;amp;rsource=blogs.esri.com%2Fesri%2Farcgis%2F2013%2F07%2F30%2Fscheduling-a-scrip" title="https://www.esri.com/arcgis-blog/products/product/analytics/scheduling-a-python-script-or-model-to-run-at-a-prescribed-time/?rmedium=redirect&amp;amp;rsource=blogs.esri.com%2Fesri%2Farcgis%2F2013%2F07%2F30%2Fscheduling-a-scrip"&gt;https://www.esri.com/arcgis-blog/products/product/analytics/scheduling-a-python-script-or-model-to-run-at-a-prescribed-t…&lt;/A&gt;&amp;nbsp;&amp;nbsp;for tips on how to do this except that you'd use the Python.exe from the environment that has ArcGIS API for Python installed in it.&amp;nbsp;Refer to&amp;nbsp;&lt;A class="link-titled" href="https://superuser.com/questions/1142185/schedule-virtualenv-dependent-python-script-with-windows-task-scheduler" title="https://superuser.com/questions/1142185/schedule-virtualenv-dependent-python-script-with-windows-task-scheduler"&gt;Schedule [Virtualenv Dependent] Python Script with Windows Task Scheduler - Super User&lt;/A&gt;&amp;nbsp;for how to do this with conda.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Apr 2018 06:09:20 GMT</pubDate>
    <dc:creator>RohitSingh2</dc:creator>
    <dc:date>2018-04-19T06:09:20Z</dc:date>
    <item>
      <title>Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753328#M321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a script that updates a feature service through the Python API in Jupyter Notebooks. I was wondering how I can run this as a scheduled task?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2018 20:38:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753328#M321</guid>
      <dc:creator>ShawnHibbs1</dc:creator>
      <dc:date>2018-04-18T20:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753329#M322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see nothing in the docs....&amp;nbsp;&lt;A href="https://esri.github.io/arcgis-python-api/apidoc/html/index.html"&gt;https://esri.github.io/arcgis-python-api/apidoc/html/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;nor in the sample notebooks&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/sample-notebooks/"&gt;https://developers.arcgis.com/python/sample-notebooks/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can the script be run as a general scheduled task?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 05:12:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753329#M322</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-04-19T05:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753330#M323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The script can be run as a genera scheduled task using Task Scheduler on Windows and cron on Linux.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could follow the blog post at&amp;nbsp;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/product/analytics/scheduling-a-python-script-or-model-to-run-at-a-prescribed-time/?rmedium=redirect&amp;amp;rsource=blogs.esri.com%2Fesri%2Farcgis%2F2013%2F07%2F30%2Fscheduling-a-scrip" title="https://www.esri.com/arcgis-blog/products/product/analytics/scheduling-a-python-script-or-model-to-run-at-a-prescribed-time/?rmedium=redirect&amp;amp;rsource=blogs.esri.com%2Fesri%2Farcgis%2F2013%2F07%2F30%2Fscheduling-a-scrip"&gt;https://www.esri.com/arcgis-blog/products/product/analytics/scheduling-a-python-script-or-model-to-run-at-a-prescribed-t…&lt;/A&gt;&amp;nbsp;&amp;nbsp;for tips on how to do this except that you'd use the Python.exe from the environment that has ArcGIS API for Python installed in it.&amp;nbsp;Refer to&amp;nbsp;&lt;A class="link-titled" href="https://superuser.com/questions/1142185/schedule-virtualenv-dependent-python-script-with-windows-task-scheduler" title="https://superuser.com/questions/1142185/schedule-virtualenv-dependent-python-script-with-windows-task-scheduler"&gt;Schedule [Virtualenv Dependent] Python Script with Windows Task Scheduler - Super User&lt;/A&gt;&amp;nbsp;for how to do this with conda.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 06:09:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753330#M323</guid>
      <dc:creator>RohitSingh2</dc:creator>
      <dc:date>2018-04-19T06:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753331#M324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I find the environment where the API is installed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 14:06:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753331#M324</guid>
      <dc:creator>ShawnHibbs1</dc:creator>
      <dc:date>2018-04-19T14:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753332#M325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/298778"&gt;Shawn Hibbs&lt;/A&gt;&amp;nbsp; - Open a command prompt and type:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;conda info &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;e&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This will output a list of all your environments and the path to where they are stored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also search for the arcgis&amp;nbsp;package in a specific environment with the following command:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;conda&amp;nbsp;list -n myenv&amp;nbsp;arcgis&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 16:17:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753332#M325</guid>
      <dc:creator>JohnYaist1</dc:creator>
      <dc:date>2018-04-19T16:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753333#M326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How would I schedule my .ipynb to run daily? Do you have an example of how I can achieve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 20:09:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753333#M326</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-21T20:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753334#M327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you find a solution to this? I'm looking for a way to run Jupyter .ipynb file on a daily basis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 20:10:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753334#M327</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-21T20:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753335#M328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There's no obvious benefit to run notebook as a backstage task. you can copy all the code into a python script file (.py) then run it in the task scheduler.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2018 23:51:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753335#M328</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2018-08-21T23:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753336#M329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found the only way to download a hosted feature service table with attachments using Python is with the ArcGIS API. This will only work as a .ipynb and not as a .py. I'm aware that I can run .py files on task scheduler but have not found a solution to run a .ipynb on some sort of scheduler.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 14:54:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753336#M329</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-22T14:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753337#M330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ArcGIS API for Python can be&amp;nbsp;used&amp;nbsp;in both interactive Jupyter notebooks or in standalone Python scripts. Do you run into issues when using the API within a standalone script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 15:03:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753337#M330</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-22T15:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753338#M331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I have been unable to run it in a standalone script. I have the API installed through ArcGIS Pro but the standalone script returns an error when I try to import arcgis. Are there additional steps I need to take to get it installed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 15:37:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753338#M331</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-22T15:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753339#M332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What error does it show? I'm guessing "Unable to import module 'arcgis'" or something similar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How are you running the script? Are you providing the path to the correct environment/interpreter?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 15:40:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753339#M332</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-22T15:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753340#M333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I export the script to a .py from my .ipynb this is what I get.....&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# coding: utf-8&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# In[1]:&lt;/SPAN&gt;


&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os
d &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strftime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;now&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"%Y%m%d"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

username &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"*************"&lt;/SPAN&gt;
password &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"**********"&lt;/SPAN&gt;
GIS &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Farcgis.com" target="_blank"&gt;https://arcgis.com&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;username&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;password&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;# In[2]:&lt;/SPAN&gt;


item_ids &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"***************"&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

export_AGO_folder &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Exports"&lt;/SPAN&gt;
export_folder &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"***************************"&lt;/SPAN&gt;
export_format &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"File Geodatabase"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#options Shapefile, CSV, File Geodatabase, &lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;#Feature Collection, GEoJSON, Scene Package, KML&lt;/SPAN&gt;
delete_tmp_files_after_export &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;# In[3]:&lt;/SPAN&gt;


&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; item &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; item_ids&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"------------------\nProcessing item: {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; item_object &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Item&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; item_object&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Feature Service"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Item {} is not a feature service, skipping"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;continue&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; export_name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; d &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"_export_"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; item_object&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title
&amp;nbsp;&amp;nbsp;&amp;nbsp; result_item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; item_object&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;export&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;export_name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; export_format&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; wait&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Exported: {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;result_item&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; export_AGO_folder&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result_item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;move&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;export_AGO_folder&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; download_result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; result_item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;download&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;export_folder&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"saved to: {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;download_result&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; delete_tmp_files_after_export&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result_item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;delete&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Deleted result"&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;/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;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;/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;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;I tried to run this as a stand alone and receive this error....&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/420330_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:58:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753340#M333</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T07:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753341#M334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this problem related to this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/791438-pyodbc-in-arcgis-pro"&gt;https://community.esri.com/message/791438-pyodbc-in-arcgis-pro&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://support.esri.com/en/technical-article/000018813" title="https://support.esri.com/en/technical-article/000018813"&gt;Problem: Unable to create environments or install packages after upgrading to ArcGIS Pro 2.2&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 15:53:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753341#M334</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2018-08-22T15:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753342#M335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you running the script?&lt;/P&gt;&lt;P&gt;Are you providing the correct Python interpreter. Can you try providing the full path the arcgispro-py3 interpreter. It should be similar to the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;C:\&amp;gt;"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe"&lt;BR /&gt;Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32&lt;BR /&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; import arcgis&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 16:09:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753342#M335</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-22T16:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753343#M336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/420306_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 16:30:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753343#M336</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-22T16:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753344#M337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The IDE you have open right now appears to be using Python 2.7.14. You need to switch your interpreter to use the Python interpreter that ships with ArcGIS Pro which should be Python 3.6.5 (if pro 2.2 I think).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;1. Open command prompt&lt;/P&gt;&lt;P&gt;2. Type "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" and hit enter. This should launch the Python Interpreter that Pro uses. Also please check that the above path is correct for you machine.&lt;/P&gt;&lt;P&gt;3. Type "import arcgis" and hit enter. This should import the arcgis module&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the above works then you should be able to run the following from command prompt:&lt;/P&gt;&lt;P&gt;"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" "&amp;lt;your script file.py&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should run your script using the ArcGIS Pro Python Interpreter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 16:40:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753344#M337</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-22T16:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753345#M338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/420307_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 16:49:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753345#M338</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-22T16:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753346#M339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh sorry, if I wasn't clear. The steps 2 and 3 were just to test the Python API import correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To run your script just do:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;1. Open command prompt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;2. Type&amp;nbsp;&lt;SPAN&gt;"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" "&amp;lt;your script file.py&amp;gt;" and hit enter&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 16:52:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753346#M339</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-22T16:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Run Python API script as scheduled task?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753347#M340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still receiving errors&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="420338" class="image-1 jive-image" height="88" src="https://community.esri.com/legacyfs/online/420338_pastedImage_1.png" width="1213" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 16:55:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/run-python-api-script-as-scheduled-task/m-p/753347#M340</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-08-22T16:55:41Z</dc:date>
    </item>
  </channel>
</rss>

