Hi Guys,
I have a python script that uses my cache update polygon layer and it works flawlessly on my desktop pc. 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. I have updated the path of the connection file when being run on the server to the connected drive G: That stand alone python script is at the bottom. That script gives me the standard 000732 Dataset does not exist or is not supported error.
Line 43Failed to execute. Parameters are not valid.
ERROR 000732: Input Service: Dataset G:\connect\admin.ags\Labels.MapServer does not exist or is not supported
Failed to execute (ManageMapServerCacheTiles).
Here is the script above and the response. I of course limited to 2 small scale levels in the interest of time. It even acknowledges the CacheUpdate layer as "Feature Set" while executing. I also tried using double \\ in the path for the polygon layer and get the same result.
C:\Python27\ArcGISx6410.4>python.exe "C:\Program Files\ArcGIS\Server\tools\admin\managecachetiles.py" -u domain\user -p password -s http://domain.server:6080 -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
Submitted.
Executing...
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"
Start Time: Wed Apr 12 11:18:16 2017
Finished:: 0 percent
Finished:: 0 percent
Estimated Time Remaining: Calculating...
Estimated Time Remaining: Calculating...
Finished:: 23 percent
Estimated Time Remaining: 3 minutes 45 seconds
Finished:: 106 percent
Estimated Time Remaining: Calculating...
C:\Python27\ArcGISx6410.4>
# Import system modules
import arcpy
from arcpy import env
import os, sys, time, datetime, traceback, string
# Set environment settings
env.workspace = "C:/scripts"
# List of input variables for map service properties
connectionFile = r"G:\connect"
server = "admin.ags"
service = "Labels.MapServer"
mapService = connectionFile + "\\" + server + "\\" + labels
scales = [115200,76800,38400,19200]
numOfCachingServiceInstances = 3
updateMode = "RECREATE_ALL_TILES"
areaOfInterest = "G:\\connect\\ags@gis.sde\\gis.DBO.CacheUpdate"
waitForJobCompletion = "DO_NOT_WAIT"
updateExtents = ""
.
.
.
result = arcpy.ManageMapServerCacheTiles_server(mapService, scales,
updateMode,
numOfCachingServiceInstances,
areaOfInterest, updateExtents,
waitForJobCompletion)