I'm troubleshooting a python script that does 3 things.
- Stops ArcGIS Server using
subprocess.check_output('net stop "ArcGIS Server"', shell=True) - Runs some arcpy functions
- Starts ArcGIS Server using
subprocess.check_output('net start "ArcGIS Server"', shell=True)
The script runs fine when run from IDLE. It also runs fine as a scheduled task when I check the radio button that says "Run only when the user is logged on"
However, this task runs on a server and I don't want to have to be logged in for the task to run. So I check the radio button that says "Run whether user is logged on or not", and "Run with highest privileges".
The result is the script's log file is empty, and the script never completes. It returns the error code in the Task Scheduler, that I mentioned above.
More task details:
- Action: Start a program
- Program/script: C:\Python27\ArcGIS10.3\python.exe
- Add arguments (optional): D:\ArcGISData\server-data\Python\copydata.py
Am I doing something wrong, or is there any other steps I can try to get this working?