Hello,
I have written a python script that modifies datasets in a geodatabase that is within a mapped network drive. I want this script to run on a schedule so a specific field gets populated consistently (this is what the script does). The issue I have been having is running the task in MS Task Scheduler with the "Run whether user is logged on or not" checked. It returns the following error: "Task Scheduler failed to start "\ScriptName" task for user "Domain/User". Additional Data: Error Value: 2147943726."
When I run the same task but with "Run only when user is logged on" selected, it works fine.
Here's a list of what I have already tried:
-creating a batch file to access the network drive using "net use" (with user and pass stored in MS Credential Manager) then calling the script and python.exe interpreter for arcpro
-same batch file but instead of python.exe, used proenv.bat, but this just opened the command window and set the environment to python without running the script
-use UNC paths for all paths to network files (the datasets in the gdb and the batch and python files themselves in the network)
-had the batch file stored locally to run and access network drive from within the batch file then run the python script
-mapped the drive from within Task Scheduler when choosing the batch or python file as action
-used python.exe file as Action and .py script as Argument
The drive is a shared drive among the organization and this gdb needs to be updated within the shared drive so I cannot work locally. I also want it to be able to run overnight when I am not on site or logged into the computer.
My user is an Administrator and has Batch run access.
Any ideas that would help this run in Task Scheduler would be greatly appreciated.