<?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: Manage cache tiles python on server side script in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561572#M21687</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a python script that uses my cache update polygon layer and it works flawlessly on my desktop pc. &amp;nbsp;The command line script on the server that I posted above also works flawlessly except the cache update polygon parameter doesn't work with either -AOI or -extent. &amp;nbsp;I have updated the path of the connection file when being run on the server to the connected drive G: &amp;nbsp;That stand alone python script is at the bottom. &amp;nbsp;That script gives me the standard 000732 Dataset does not exist or is not supported error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line 43Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Service: Dataset G:\connect\admin.ags\Labels.MapServer does not exist or is not supported&lt;BR /&gt;Failed to execute (ManageMapServerCacheTiles).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the script above and the response. &amp;nbsp;I of course limited to 2 small scale levels in the interest of time. &amp;nbsp;It even acknowledges the CacheUpdate layer as "Feature Set" while executing. &amp;nbsp;I also tried using double \\ in the path for the polygon layer and get the same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C:\Python27\ArcGISx6410.4&amp;gt;python.exe "C:\Program Files\ArcGIS\Server\tools\admin\managecachetiles.py" -u domain\user -p password -s &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdomain.server%3A6080" rel="nofollow" target="_blank"&gt;http://domain.server:6080&lt;/A&gt;&lt;SPAN&gt; -n Labels:MapServer -scales "76800;38400" -mode RECREATE_ALL_TILES -i 3 -AOI "G:\connect\ags@gis.sde\gis.DBO.CacheUpdate -wait DO_NOT_WAIT&lt;/SPAN&gt;&lt;BR /&gt;Submitted.&lt;BR /&gt;Executing...&lt;BR /&gt;Executing (Manage Map Cache Tiles): ManageMapCacheTiles Labels:MapServer 76800;38400 3 RECREATE_ALL_TILES # "G:\connect\ags@gis.sde\gis.DBO.CacheUpdate -wait DO_NOT_WAIT" "Feature Set"&lt;BR /&gt;Start Time: Wed Apr 12 11:18:16 2017&lt;BR /&gt;Finished:: 0 percent&lt;BR /&gt;Finished:: 0 percent&lt;BR /&gt;Estimated Time Remaining: Calculating...&lt;BR /&gt;Estimated Time Remaining: Calculating...&lt;BR /&gt;Finished:: 23 percent&lt;BR /&gt;Estimated Time Remaining: 3 minutes 45 seconds&lt;BR /&gt;Finished:: 106 percent&lt;BR /&gt;Estimated Time Remaining: Calculating...&lt;/P&gt;&lt;P&gt;C:\Python27\ArcGISx6410.4&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import system modules&lt;BR /&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;BR /&gt;import os, sys, time, datetime, traceback, string&lt;/P&gt;&lt;P&gt;# Set environment settings&lt;BR /&gt;env.workspace = "C:/scripts"&lt;/P&gt;&lt;P&gt;# List of input variables for map service properties&lt;BR /&gt;connectionFile = r"G:\connect"&lt;BR /&gt;server = "admin.ags"&lt;BR /&gt;service = "Labels.MapServer"&lt;BR /&gt;mapService = connectionFile + "\\" + server + "\\" + labels&lt;BR /&gt;scales = [115200,76800,38400,19200]&lt;BR /&gt;numOfCachingServiceInstances = 3&lt;BR /&gt;updateMode = "RECREATE_ALL_TILES"&lt;BR /&gt;areaOfInterest = "G:\\connect\\ags@gis.sde\\gis.DBO.CacheUpdate"&lt;BR /&gt;waitForJobCompletion = "DO_NOT_WAIT"&lt;BR /&gt;updateExtents = ""&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;result = arcpy.ManageMapServerCacheTiles_server(mapService, scales,&lt;BR /&gt; updateMode,&lt;BR /&gt; numOfCachingServiceInstances,&lt;BR /&gt; areaOfInterest, updateExtents,&lt;BR /&gt; waitForJobCompletion)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Apr 2017 17:00:55 GMT</pubDate>
    <dc:creator>CoryHines</dc:creator>
    <dc:date>2017-04-12T17:00:55Z</dc:date>
    <item>
      <title>Manage cache tiles python on server side script</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561567#M21682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running server 10.4 an attempting to automate some cache updates. &amp;nbsp;In a SQL database I have a polygon feature class I use to isolate areas that need to be updated each day. &amp;nbsp;The issue I'm running in to is the -AOI and the -extent parameters are not being honored and the full extent is being re-cached. &amp;nbsp;I have tested both with no success. &amp;nbsp;Has anyone else ran into this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;python.exe "C:\Program Files\ArcGIS\Server\tools\admin\managecachetiles.py" -u domain\user -p *** -s &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fserver.domain%3A6080" rel="nofollow" target="_blank"&gt;http://server.domain:6080&lt;/A&gt;&lt;SPAN&gt; -n Service:MapServer -scales "76800;38400;19200;9600;4800;2400;1200;600;300;150" -mode RECREATE_ALL_TILES -i 3 -AOI "G:\connect\ags@gis.sde\gis.DBO.CacheUpdate -wait DO_NOT_WAIT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any insight.&lt;/P&gt;&lt;P&gt;Cory&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Apr 2017 21:48:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561567#M21682</guid>
      <dc:creator>CoryHines</dc:creator>
      <dc:date>2017-04-11T21:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Manage cache tiles python on server side script</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561568#M21683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Hm, I tested this on my end and could reproduce the behavior. &amp;nbsp;I tried with the Manage Map Server Cache Tiles tool directly and didn't see a problem. &amp;nbsp;You may want to write your own script to run using the tool directly instead of relying on the admin tools and also contact Support to report the behavior.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 01:08:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561568#M21683</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-04-12T01:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Manage cache tiles python on server side script</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561569#M21684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for checking this on your end Jonathan. &amp;nbsp;I will put in a support ticket to see what they come up with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a side note the reason I went this route is because I was unable to get a stand alone python script to run on the server side. &amp;nbsp;I tried many different ways and it always threw an error when attempting to connect to my service. &amp;nbsp;I tried referencing a connection file as well as hard coding the connection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way I've been able to run this process is via my desktop as stand-alone or python script, but I would like to avoid using my pc for this type of task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cory&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 12:36:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561569#M21684</guid>
      <dc:creator>CoryHines</dc:creator>
      <dc:date>2017-04-12T12:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Manage cache tiles python on server side script</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561570#M21685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you recall what error were you getting? &amp;nbsp;A convenient way to step through creating your own script is to run the tool in ArcMap, and then copy the result as a python snippet. You can try to run it again in the Python window or in a standalone script. &amp;nbsp;If you're using it in a standalone script it's important to replace the connection string for the GIS Server, (which would default to "GIS Servers\&amp;lt;gis_server_connection_name.ags" or something similar), with the correct path on disk.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 15:40:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561570#M21685</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-04-12T15:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Manage cache tiles python on server side script</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561571#M21686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post your python script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have scripts managing caches up and running for years with the ManageMapServerCacheTiles_server call in python from a GIS process server that is separate from the ArcGIS Server (AGS) servers, so maybe you just have a syntax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you ever tried to update a cache with python in a lower version of AGS (e.g. 10.2.x, 10.3.x)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 15:54:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561571#M21686</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2017-04-12T15:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Manage cache tiles python on server side script</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561572#M21687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a python script that uses my cache update polygon layer and it works flawlessly on my desktop pc. &amp;nbsp;The command line script on the server that I posted above also works flawlessly except the cache update polygon parameter doesn't work with either -AOI or -extent. &amp;nbsp;I have updated the path of the connection file when being run on the server to the connected drive G: &amp;nbsp;That stand alone python script is at the bottom. &amp;nbsp;That script gives me the standard 000732 Dataset does not exist or is not supported error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line 43Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Service: Dataset G:\connect\admin.ags\Labels.MapServer does not exist or is not supported&lt;BR /&gt;Failed to execute (ManageMapServerCacheTiles).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the script above and the response. &amp;nbsp;I of course limited to 2 small scale levels in the interest of time. &amp;nbsp;It even acknowledges the CacheUpdate layer as "Feature Set" while executing. &amp;nbsp;I also tried using double \\ in the path for the polygon layer and get the same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C:\Python27\ArcGISx6410.4&amp;gt;python.exe "C:\Program Files\ArcGIS\Server\tools\admin\managecachetiles.py" -u domain\user -p password -s &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdomain.server%3A6080" rel="nofollow" target="_blank"&gt;http://domain.server:6080&lt;/A&gt;&lt;SPAN&gt; -n Labels:MapServer -scales "76800;38400" -mode RECREATE_ALL_TILES -i 3 -AOI "G:\connect\ags@gis.sde\gis.DBO.CacheUpdate -wait DO_NOT_WAIT&lt;/SPAN&gt;&lt;BR /&gt;Submitted.&lt;BR /&gt;Executing...&lt;BR /&gt;Executing (Manage Map Cache Tiles): ManageMapCacheTiles Labels:MapServer 76800;38400 3 RECREATE_ALL_TILES # "G:\connect\ags@gis.sde\gis.DBO.CacheUpdate -wait DO_NOT_WAIT" "Feature Set"&lt;BR /&gt;Start Time: Wed Apr 12 11:18:16 2017&lt;BR /&gt;Finished:: 0 percent&lt;BR /&gt;Finished:: 0 percent&lt;BR /&gt;Estimated Time Remaining: Calculating...&lt;BR /&gt;Estimated Time Remaining: Calculating...&lt;BR /&gt;Finished:: 23 percent&lt;BR /&gt;Estimated Time Remaining: 3 minutes 45 seconds&lt;BR /&gt;Finished:: 106 percent&lt;BR /&gt;Estimated Time Remaining: Calculating...&lt;/P&gt;&lt;P&gt;C:\Python27\ArcGISx6410.4&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import system modules&lt;BR /&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;BR /&gt;import os, sys, time, datetime, traceback, string&lt;/P&gt;&lt;P&gt;# Set environment settings&lt;BR /&gt;env.workspace = "C:/scripts"&lt;/P&gt;&lt;P&gt;# List of input variables for map service properties&lt;BR /&gt;connectionFile = r"G:\connect"&lt;BR /&gt;server = "admin.ags"&lt;BR /&gt;service = "Labels.MapServer"&lt;BR /&gt;mapService = connectionFile + "\\" + server + "\\" + labels&lt;BR /&gt;scales = [115200,76800,38400,19200]&lt;BR /&gt;numOfCachingServiceInstances = 3&lt;BR /&gt;updateMode = "RECREATE_ALL_TILES"&lt;BR /&gt;areaOfInterest = "G:\\connect\\ags@gis.sde\\gis.DBO.CacheUpdate"&lt;BR /&gt;waitForJobCompletion = "DO_NOT_WAIT"&lt;BR /&gt;updateExtents = ""&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;result = arcpy.ManageMapServerCacheTiles_server(mapService, scales,&lt;BR /&gt; updateMode,&lt;BR /&gt; numOfCachingServiceInstances,&lt;BR /&gt; areaOfInterest, updateExtents,&lt;BR /&gt; waitForJobCompletion)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 17:00:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561572#M21687</guid>
      <dc:creator>CoryHines</dc:creator>
      <dc:date>2017-04-12T17:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Manage cache tiles python on server side script</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561573#M21688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm wondering if your script has an issue with the areaOfInterest as it looks like an SDE connection. &amp;nbsp;Just as a test, can you copy the area of interest feature class from SDE to a file geodatabase and then run your script on a path to the file geodatabase. &amp;nbsp;In my update scripts, I save out the areas to be updated to a file geodatabase and I do not have this data in an SDE geodatabase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 17:20:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561573#M21688</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2017-04-12T17:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Manage cache tiles python on server side script</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561574#M21689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same result, it rebuilds the entire extent. &amp;nbsp;I'm going to log a support ticket with Esri. &amp;nbsp;I did stumble upon a post from a couple of years ago indicating this is likely a bug, but that was&amp;nbsp;a couple of versions ago. &amp;nbsp;Would have thought they would have fixed something this minor by now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Michael.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/115414"&gt;https://community.esri.com/thread/115414&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2017 18:47:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/manage-cache-tiles-python-on-server-side-script/m-p/561574#M21689</guid>
      <dc:creator>CoryHines</dc:creator>
      <dc:date>2017-04-12T18:47:55Z</dc:date>
    </item>
  </channel>
</rss>

