<?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 arcpy on server in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1039781#M29786</link>
    <description>&lt;P&gt;Looking to Esri's documentation on &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/share-analysis/authoring-geoprocessing-services-with-python-scripts.htm" target="_blank"&gt;Authoring geoprocessing services with Python scripts—ArcGIS Pro | Documentation&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Most Python script tools that execute successfully on your computer will publish and execute successfully as a geoprocessing service—you do not have to modify your script in any way.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In terms of scheduling, there are multiple ways it can be done, which works best depends on your situation.&amp;nbsp; Geoprocessing services themselves do not have a setting to have the service execute automatically, the service has to be called.&amp;nbsp; ArcGIS Pro includes scheduling tools, which rely on Windows Task Scheduler, and Notebook Server now supports scheduling notebook tasks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Mar 2021 14:17:32 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2021-03-23T14:17:32Z</dc:date>
    <item>
      <title>run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1039770#M29784</link>
      <description>&lt;P&gt;Hi everybody, is it possible to run an arcpy scripts with:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ArcGISProject that open .aprx file&lt;/LI&gt;&lt;LI&gt;arcpy.da.SearchCursor to connect to oracle&lt;/LI&gt;&lt;LI&gt;exportToPDF to export a Layout in the .aprx&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and if yes,&amp;nbsp; is it possible to schedule it or run it on demand?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naty&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 14:04:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1039770#M29784</guid>
      <dc:creator>NatashaManzuiga</dc:creator>
      <dc:date>2021-03-23T14:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1039781#M29786</link>
      <description>&lt;P&gt;Looking to Esri's documentation on &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/share-analysis/authoring-geoprocessing-services-with-python-scripts.htm" target="_blank"&gt;Authoring geoprocessing services with Python scripts—ArcGIS Pro | Documentation&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Most Python script tools that execute successfully on your computer will publish and execute successfully as a geoprocessing service—you do not have to modify your script in any way.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In terms of scheduling, there are multiple ways it can be done, which works best depends on your situation.&amp;nbsp; Geoprocessing services themselves do not have a setting to have the service execute automatically, the service has to be called.&amp;nbsp; ArcGIS Pro includes scheduling tools, which rely on Windows Task Scheduler, and Notebook Server now supports scheduling notebook tasks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 14:17:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1039781#M29786</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-03-23T14:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1040028#M29799</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/11987"&gt;@NatashaManzuiga&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Yes, it's possible to run such a script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get the .aprx file:&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject(path to aprx)&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Define source:&lt;BR /&gt;Source = path to feature class on sde on Oracle&lt;/P&gt;&lt;P&gt;Search cursor&lt;BR /&gt;cursor = arcpy.da.SearchCursor(source, [fields to seach])&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/searchcursor-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/searchcursor-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Get the layout from the .aprx&lt;BR /&gt;layout = aprx.listLayouts("wildcard layout name*")[0]&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layout-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layout-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Export to PDF:&lt;BR /&gt;layout.exportToPDF(path of output file)&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/sharing/overview/pdf-export.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/help/sharing/overview/pdf-export.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As for scheduling,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1371"&gt;@JoshuaBixby&lt;/a&gt;&amp;nbsp;has it right - it'll depend on your platform, but yes, it's possible.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;If this answer solved your question or if you found it helpful please mark it accordingly to help others who have the same question.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 04:30:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1040028#M29799</guid>
      <dc:creator>UriGilad_EsriAu</dc:creator>
      <dc:date>2021-03-24T04:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1040103#M29802</link>
      <description>&lt;P&gt;I run the script with 3 parameters...and it's ok in local.&lt;/P&gt;&lt;P&gt;projectPath=arcpy.GetParameterAsText(0)&lt;BR /&gt;dbTablePath=arcpy.GetParameterAsText(1)&lt;BR /&gt;pdfPath=arcpy.GetParameterAsText(2)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'trying to publish the script but how can I change the parameters (to let it run on the server) ?&lt;/P&gt;&lt;P&gt;and also I tried to publish a simple script...with:&lt;BR /&gt;print ("Hello")&lt;/P&gt;&lt;P&gt;and I got this error:&lt;BR /&gt;Script1 113 GPService https://xxxxxxxx:6443/arcgis/admin siteadmin 2021-03-24 16:33:26 Status: Failed StatusMessage: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (&lt;A href="http://esriurl.com/support" target="_blank" rel="noopener"&gt;http://esriurl.com/support&lt;/A&gt;) to Report a Bug, and refer to the error help for potential solutions or workarounds. ErrorMessage: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (&lt;A href="http://esriurl.com/support" target="_blank" rel="noopener"&gt;http://esriurl.com/support&lt;/A&gt;) to Report a Bug, and refer to the error help for potential solutions or workarounds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Naty&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 16:10:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1040103#M29802</guid>
      <dc:creator>NatashaManzuiga</dc:creator>
      <dc:date>2021-03-24T16:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1040478#M29813</link>
      <description>&lt;P&gt;Hi Naty, would you be able to share the script/toolbox?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 00:35:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1040478#M29813</guid>
      <dc:creator>UriGilad_EsriAu</dc:creator>
      <dc:date>2021-03-25T00:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1040537#M29817</link>
      <description>&lt;P&gt;I just want to run it on my Linux ArcGIS Server. What I have to do?&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naty&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 10:41:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1040537#M29817</guid>
      <dc:creator>NatashaManzuiga</dc:creator>
      <dc:date>2021-03-25T10:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1041446#M29835</link>
      <description>&lt;P&gt;I run the script with 3 parameters...and it's ok in local.&lt;/P&gt;&lt;P&gt;projectPath=arcpy.GetParameterAsText(0)&lt;BR /&gt;dbTablePath=arcpy.GetParameterAsText(1)&lt;BR /&gt;pdfPath=arcpy.GetParameterAsText(2)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'trying to publish the script but how can I change the parameters (to let it run on the server) ?&lt;/P&gt;&lt;P&gt;and also I tried to publish a simple script...with:&lt;BR /&gt;print ("Hello")&lt;/P&gt;&lt;P&gt;and I got this error:&lt;BR /&gt;Script1 113 GPService https://xxxxxxxx:6443/arcgis/admin siteadmin 2021-03-24 16:33:26 Status: Failed StatusMessage: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (&lt;A href="http://esriurl.com/support" target="_blank" rel="noopener nofollow noreferrer"&gt;http://esriurl.com/support&lt;/A&gt;) to Report a Bug, and refer to the error help for potential solutions or workarounds. ErrorMessage: ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (&lt;A href="http://esriurl.com/support" target="_blank" rel="noopener nofollow noreferrer"&gt;http://esriurl.com/support&lt;/A&gt;) to Report a Bug, and refer to the error help for potential solutions or workarounds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Naty&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 08:29:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1041446#M29835</guid>
      <dc:creator>NatashaManzuiga</dc:creator>
      <dc:date>2021-03-29T08:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1041538#M29837</link>
      <description>&lt;P&gt;Please share the simple script with the print statement in it that fails (unless the script it just the one line you already shared), then others can look at the code and try publishing it on their machines to see if there are issues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 14:48:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1041538#M29837</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-03-29T14:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1041568#M29840</link>
      <description>&lt;P&gt;here you are &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;print("Hello World")&lt;/LI-CODE&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1371"&gt;@JoshuaBixby&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Please share the simple script with the print statement in it that fails (unless the script it just the one line you already shared), then others can look at the code and try publishing it on their machines to see if there are issues.&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 29 Mar 2021 15:29:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1041568#M29840</guid>
      <dc:creator>NatashaManzuiga</dc:creator>
      <dc:date>2021-03-29T15:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1044237#M29895</link>
      <description>&lt;P&gt;If you can't successfully publish and execute your single-line script, then something is definitely configured wrong with ArcGIS Server.&amp;nbsp; Unfortunately, ERROR 999999 is a catch-all error code when something more specific isn't available.&amp;nbsp; I suggest contacting Esri Support at this point because it is hard for Esri Community members to troubleshoot issues with users' ArcGIS Enterprise deployments.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 17:25:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1044237#M29895</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-04-06T17:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: run arcpy on server</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1049712#M29991</link>
      <description>&lt;P&gt;I just needed to upgrade ArcGIS Pro to the 2.6.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naty&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 17:50:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/run-arcpy-on-server/m-p/1049712#M29991</guid>
      <dc:creator>NatashaManzuiga</dc:creator>
      <dc:date>2021-04-21T17:50:15Z</dc:date>
    </item>
  </channel>
</rss>

