Not running, nor wanting to run, WebGISDR. Just thought it would be helpful to get that out of the way at the beginning. I have a somewhat new stand-alone ArcGIS Server 11.3 production environment for which I am trying to automate the server configuration backups using ArcGIS Server's backup utility (backup.py).
ArcGIS Server is installed on Windows Server 2022.
I can run a successful backup from the server's Command Prompt. But the backup will not run from the Task Scheduler, and it is using the same parameters that were successful from the Command Prompt. Does not run when scheduled or when run on demand. The Task Scheduler starts the task but the task keeps running until it hits the assigned stopping point after two hours. No error message, in fact, the task history panel says it ended successfully, but no configuration file ever gets created.
With ArcGIS Server 10.7.1 and 10.8.0, I never had any issues performing this exact same task. The primary difference with the newer ArcGIS Server version, that I see, is instead of calling python.exe, you call propy.bat which appears to run from cmd.exe in the background, then ultimately runs backup.py. But I don't think it ever gets to backup.py in my case, although I don't actually know.
I would love to hear from anyone who may have an answer to this issue, or is also suffering from it, or feels like expressing empathy.
Solved! Go to Solution.
Going through an Esri support case made this work again, but in a little different way than before.
Prior to version 11.x (ArcGIS Server), in the Actions tab of Task Scheduler, I would call the propy.bat for the Program and then populate the Arguments box with everything else required to run the backup utility.
For my current AGS at 11.3, the Task Scheduler didn't like that prior method or the backup utility didn't like that method (or maybe it was something else that was angry...still do not know the culprit), so Esri advised me to try using a batch file that held all the needed Python program calls and arguments within, and just call the new batch file from the Actions tab in Task Scheduler. It worked!
In addition, the new all encompassing batch file had to be located in the install folder that contains backup.py.
Ouch. That does not feel like fun so sorry dude.
I'm just starting our 11.3 installation tomorrow but maybe have a few ideas to help as this problem, to me, sounds a bit like an IT permissions one that I have run into from time to time. The 10.7/.8 servers were likely running on an earlier version of Windows server - 2012 perhaps. So some things to try:
Home this triggers some other thoughts to consider as well.
Tom
@ThomasHoman Thanks for the suggestions. All my permissions should be good based on other successful tests from that Task Scheduler. This includes success running python scripts that I or my department have made for ArcGIS Pro.
Then...
This morning I finally had the sense to perform a test using another ArcGIS Server utility - serverScan.py. It ran and succeeded perfectly fine. Even more confused now.
I see no obvious clues in Windows Event Viewer, although I'm no expert in that space.
Going through an Esri support case made this work again, but in a little different way than before.
Prior to version 11.x (ArcGIS Server), in the Actions tab of Task Scheduler, I would call the propy.bat for the Program and then populate the Arguments box with everything else required to run the backup utility.
For my current AGS at 11.3, the Task Scheduler didn't like that prior method or the backup utility didn't like that method (or maybe it was something else that was angry...still do not know the culprit), so Esri advised me to try using a batch file that held all the needed Python program calls and arguments within, and just call the new batch file from the Actions tab in Task Scheduler. It worked!
In addition, the new all encompassing batch file had to be located in the install folder that contains backup.py.