0

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?

1 Answer 1

1

Not sure why it wasn't working to be honest, but after going through the steps to recreate the task, it started working. Maybe I had just mistakenly entered the credentials of the user running the task or something like that.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.