1

I have a Python script that uses the Python API to logging into the server, stop geocode services, rebuild locators and start services. I'm using task scheduler on a server machine where other Python scripts work correctly in task scheduler.

Is there a way to use Windows task scheduler to run this script? I've tried this Schedule a Python Script using Windows Task Scheduler and Run stand-alone scripts without success.

Windows server 2019, Here's a screenshot of the settings in task scheduler enter image description here

5
  • What version of Windows are you using? And can you post what your settings are currently in the Task Scheduler? From my experience, it is very sensitive.
    – Pfalbaum
    Jun 9 '21 at 21:12
  • The details surrounding "without success" would be very useful in identifying a solution.
    – Vince
    Jun 9 '21 at 21:40
  • By "without success" I mean that task scheduler does not trigger the script to run at the scheduled time. The script works fine in the IDE but doesn't work when a task is created in task scheduler. The settings in task scheduler are the same as other tasks that have successfully run other python scripts.
    – Omega
    Jun 10 '21 at 16:40
  • I see you have "D:\Program Files\ArcGIS\Pro\bin\Python\Scripts\propy.bat" as your Program/script parameter on the Actions tab. Maybe you have your reasons, I'm not sure. I have that set to either "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\pythonw.exe" or "...\python.exe".
    – Pfalbaum
    Jun 10 '21 at 19:32
  • 1
    I've tried setting the Program/script parameter on the Actions tab to: "D:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\pythonw.exe" this at least starts the script in task scheduler because it can write the script progress to a log with a different error now. Thanks!!!
    – Omega
    Jun 11 '21 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.