|
This executable from ESRI, although not supported, works well at stopping and starting your ArcGIS services. This works for all services including globe, geocode, geoprocessing and map services.
Included in this zip archive are the arcgisservice.exe and the instruction.txt file. This exe can be used through the command line like the example given in the instructions C:\> arcgisservice [serverName] [serviceName] [serviceType] [stop | start] Example: Stop the MapService called "myService". Note: The executable is case-sensitive. C:\> arcgisservice myServer myService MapServer stop
or more realistically it can be run as a scheduled task using batch (.bat) files. Follow this link for a good picture tutorial of how to schedule tasks. To accomplish this, you need to have the arcgisservice.exe in the same directory as your batch file or reference the path on disk in the batch file to the exe. The example below starts a mapserver from a batch file with the exe in the same directory. arcgisservice 192.168.0.1 myMapService MapServer stop arcgisservice 192.168.0.1 myMapService MapServer start
This will stop and start your service bringing the number of instances back down to the default level. One may have thought the recycling interval property would have done this also but that is not the case. If you wanted to log your batch file progress you can write to an existing text file with the syntax below @ECHO ON echo ------------------------------------------ >> C:\Scheduled\log.txt echo stopping service at %TIME% - %DATE% >> C:\Scheduled\log.txt |