sarbajit

How to start/stop services from SOC?

Discussion created by sarbajit on Aug 20, 2012
Latest reply on Aug 20, 2012 by sarbajit
How do we start/stop services from SOC machine? I've used the following code:

import arcpy
import os
from os import system

mapservicelist = ["folder1/mapservice1", "folder1/mapservice2"]

for ms in mapservicelist:
    os.system(r"\\SOM Machine Name\c$\Users\ArcGISSOM ArcGIS Server Name -x" + ms)
    print "Services Stopped!"


The code runs without error but when I check ArcCatalog, the services are not stopped! Please help.

Outcomes