Enterprise/Pro Task Scheduling with Service Account

02-14-2022 08:24 AM
New Contributor

I could use some direction on the use of Windows service accounts and using those accounts to authorize scheduled tasks.

I have a few models I wish to schedule on my server.  Using a copy of Pro on the hosting machine I have built my models and scheduled the tasks. Going to the Windows Task Scheduler, in the past I have simply authorized the task to run while not logged in.  But I would like to run the task under service account so if my password is changed or I am no longer charged with maintaining this task, it will continue to run. 

However, if I try changing ownership of the task to something like the SYSTEM account, the task is reported to have ran but the history in Pro says otherwise and the result code is "(0x1)". No message, just hex 1. 

Further in the History tab, the Action Completed reports this error: 

Task Scheduler successfully completed task "\EnerGov - Export Cache" , instance "{4c1b9fbd-12d1-442d-b24a-b49784011062}" , action "E:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\pythonw.exe" with return code 2147942401.

Running the task manually, or changing it back to my ownership still results in bad behaviour. I have to completely recreated the task.

The documentation make mention to: Scheduling a geoprocessing tool is possible with all licensing types supported by ArcGIS Pro. However, for Named User licensing, you must check the Sign me in automatically check box when signing in to the user account. This is required for the scheduled tool to run outside the ArcGIS Pro application.

But I don't feel like this applies unless credentials for Pro are stored in a way that is attached to my server login.

3 Replies
MVP Frequent Contributor

How is your network setup to run service accounts?

Are there any Active Directory Group Policies controlling access?

How is the connection to your geodatabase, feature service, etc. configured?

0 Kudos
Occasional Contributor III

@HyperBoreal did you ever get this solved? We are having similar hang-ups and it would be great to learn more so we can troubleshoot and/or set things up accordingly. Thanks in advance

cc: @LeahClark 

0 Kudos
New Contributor III

Anyone else run into this? I'm having similar troubles. I have a scheduled task created in Pro 3.2 that runs a Data Interop job. Under my local account, it runs fine, but as soon as I change it to a service account, I get a 0x1 run result in Task Scheduler, which is related to missing permissions. It says it completes successfully but the job does not run or update the data, and there's no evidence of it running in the Pro GP history or logs.  I've tried granting explicit Read/Execute permissions to the Pro python exe folder, the Data Interop web connections folder, and my user account's folder that stores the Pro project, but it's still failing.  I don't know what other permissions it would even need.

0 Kudos