Select to view content in your preferred language

ArcPro 3.0 did not fix scheduled tools

4057
24
06-28-2022 01:33 PM
Michael_VanHatten
Regular Contributor

I am wondering if anyone has been able to get the Tool Scheduler to work with Pro 3.0. There has been a bug ( BUG-000131693.) that has been keeping 2.9.xx from running scheduled tools. It was claimed by an ESRi employee here https://community.esri.com/t5/arcgis-pro-questions/scheduled-modelbuilder-task-fails-on-select-layer... that the issue would be fixed with the 3.o update. I have been waiting weeks for the update, just to find out that I now get a new error message and the scheduled tools do not work. They run without any errors when I manually run them but that is not the workflow I want to use. ESRI claims they were addressing the issue, can anyone confirm that the schedule tools function is working? I am running some very simple model builder tools, nothing fancy, select by attributes and recalculate attributes. No crazy complex analysis, is it just me thinking every time new version come out more problems come up with promises of fixes at the next version?

 

24 Replies
DrewFlater
Esri Regular Contributor

@Michael_VanHatten while I am not the employee who said in the forum your problem would be fixed in 3.0, I am the one that tested and verified BUG-000131693 is working in Pro 3.0. 

Can you please give more details about the errors you are experiencing? 

I just retested a scenario like what you described, using a ModelBuilder tool to select some features and calculate a field, run on a schedule. This is completing successfully for me, as long as I do not have the layer/table open in Pro, since that would cause a schema lock with the external scheduled process which is trying to update the data out in Python. You should also double check that if you are using a layer as input to the selection tool, that the project is saved with that layer, otherwise again the external process will not be able to locate what you want to use as input (there are warnings about this in the scheduling UI button, and in the documentation). 

So here is what is working for me. I have a dataset, which has 10 or so STATENAME values. I want to select and calculate a field only for those with STATENAME=Wisconsin. So I perform the selection against the data path, then send the result to Calculate Field. The calculation I perform is some basic text, WI, plus a timestamp so I can definitely see that the calculation is being performed at the time that the scheduled process ran. 

 

DrewFlater_0-1656452081033.png

DrewFlater_1-1656452522617.png

 

You can see in the History >Geoprocessing > Scheduled section I have one time that the scheduled process failed. That was for the schema lock that I mentioned before, as I had the data open in Pro, and it could not perform the calculation while the data is locked for use in Pro. 

Michael_VanHatten
Regular Contributor

Hi @DrewFlater,

 

Thanks for the response, I have verified that I am using the correct layers in the tools and have them unopened in the map or project. I would like to run these tools to update a few inspection layers we use to populate dashboards and keep field inspection maps up to date.  I noticed that you're using data that is saved in a geodatabase. I am trying to use host feature services from the company Enterprise Portal, is that the issue here?

I attached a screenshot of the model I am trying to run, very simple, adds a join, selects by attributes, calculates a field, removes join. 

Thanks

0 Kudos
DrewFlater
Esri Regular Contributor

@Michael_VanHatten the model looks fine.

Scheduled tools support any data format/location, but there are gotchas when working with remote data, covered here: https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/schedule-geoprocessing-t...

If you can screenshot the error messages from the failed task run of your scheduled tool, it will help to know what tool or process is failing and why (like in my failed task that I pictured and described above, you can hover on that and pop-out the messages window to look at the detailed errors/warnings).

0 Kudos
Michael_VanHatten
Regular Contributor

@DrewFlater I attached the two error messages I get, I have three models I want to run (separately) and I get one of these errors each time I try a scheduled run. I guess I don't understand what this data lock is? I unchecked all the layers and run the tool with ArcPro completely closed on my computer. All the layers in the models are feature services on my enterprise with full abilities to edit attributes and geometry. 

 

Thanks

0 Kudos
DrewFlater
Esri Regular Contributor

@Michael_VanHatten 

Regarding Facility Layer Inspection Update pictured error, this error is coming from the server side when using your data with the AddJoin tool. Can you confirm the model runs from within Pro? Do you have credentials to access those services saved for your account from within Pro? I can imagine a scenario where this error is raised because the external Python process that runs the scheduled model cannot gain access to those services, as it is a headless operation that does not prompt for credentials. When you add those services to a map, or when making a server or portal connection to access those items, make sure the option is checked to Save User/Password or "Sign in automatically" since those are the only ways to make sure the Python process can access secure data sources. 

Regarding the other capture.png with Error 000852, this is an error that occurs when you have specified that Calculate Field should add a new field to perform the calculation into, in this case it looks like you have specified as the input field: "L1Facilities_View_2022_Score.condition_rating_2022". Is this intentional that the calculation should be into a new field? Or you got that field by selecting from the input field choice list? There might be a bug happening here with Calculate Field with a joined feature service causing this problem. I will test this scenario while you are responding. 

0 Kudos
Michael_VanHatten
Regular Contributor

@DrewFlater 

I am still struggling to understand what the issue is. Yes I created and run the model in Pro. I have all the boxes checked for the (sign me in automatically stuff) I can manually run both of my models in pro without any bugs or error messages. The only issue comes when I schedule the tasks. I have tried the scheduled runs with pro open on my computer and me logged in to everything (which defeats the purpose of scheduling) and with Pro closed on my computer. I can confirm that I have all the necessary access to the layers and the editing capabilities. I run these tools at least once a week manually. I am not creating any new fields, I am doing a join of two layers (inspection layer & facility layer), selecting the facilities with new inspection dates, and in the facilities layer I am calculating an existing field to show that the inspection is done. Then the join is removed. I would give up and continue running these models manually but I refuse to accept that a simple model will not run on a schedule while ESRI clearly advertises the ability. 

 

Thanks for all the help

 

DrewFlater
Esri Regular Contributor

@Michael_VanHatten I have not been able to look at this case further to see if I can reproduce the problems when adding the Add Join step and using feature services. I am getting some help from a teammate to keep looking into this. I would say that tech support would be more able to give live troubleshooting help for an involved problem like this. The BUG you mentioned about was specifically about Select Layer By Attribute, and that error has been resolved in Pro 3.0 (confirmed by some other commenters in the other threads). Since you are encountering more problems, we want to understand and resolve them. Thank you for your patience and help to understand the problem. 

0 Kudos
DrewFlater
Esri Regular Contributor

Also @Michael_VanHatten , I forgot to respond to your statements...

1. The error messages you indicate don't have anything to do with data lock. Data lock was the problem I described previously that was responsible for the error I pictured, but doesn't have anything to do with your case(s).

2. The capabilities of the feature services shouldn't impact this case. Yes to run Calculate Field you'll need the Edit capability like you mentioned. But the error messages indicate that the failure is before any calculation is even attempted, when the tool is adding a field to perform a calculation into. This might either be your choice or there is a bug causing the tool to interpret the field you chose as a new field, either due to the data source, the join, and/or both. 

0 Kudos
XiaoXiao2
Esri Contributor

Hi @Michael_VanHatten ,

I have created a feature service and feature table to follow your workflow. And created "Add_Join", "Select By Attribute" and "Calculate Field" functions in  the model builder. Unfortunately, the issue cannot be reproduced.

XiaoXiao2_0-1657152356851.png

In this case, could you please contact esri technical support to take a further troubleshooting process? They will take a look at your data and walk through the steps. If the issue can be reproduced, we will try to fix it for you.

Thanks

0 Kudos