Running Python script in Task Scheduler-- Script will not run
I use the following settings to "Start a program" in the task scheduler. I find it best to use the full path to the Python executable to be safe.
Program/script: Full path to Python.exe, C:\Python27\ArcGIS10.2\python.exe
Arguments: Name of script, script.py
Start in: Location of script.py
, something like C:\path\to\script
Also, if you pass in arguments to your script, include those with the arguments section, separated by spaces, script.py arg1 arg2 argn
I have always set up simple batch files like this:
start C:\Python27\ArcGIS10.3\python.exe \\some_server\some_script.py
You'll just want to make sure the full path to the executable and script match exactly. If the path has any spaces in in it, you'll need to wrap it in double quotes. (" "
)