I have a ModelBuilder process which carries out the following (diagram attached):
When run 'in person' in ArcGIS Pro, the model runs without issue. However, it fails when run as a Scheduled Task, giving the following error:
ERROR 000358: Invalid expression
Failed to execute (Select Layer By Attribute).
The error help page is not particularly useful in this instance. Any ideas?
This is BUG-000131693 - Select Layer By Attributes fails with ERROR 000358 or ERROR 000732 when scheduled in ArcGIS Pro. It is fixed at ArcGIS Pro 3.0. There is no current workaround in ArcGIS 2.9.x unfortunately.
Has there been any progress with this bug? Do we have to wait until 3.0 for automatic geoprocessing? It seems like this should be low hanging fruit.
Michael - BUG-000131693 was fixed at ArcGIS Pro 3.0...which should be released very, very soon I suspect with User Conference coming up next month. Esri tends to release software updates a few weeks before UC.
Thanks Robert
Is there a timeline for the 3.0 release?
Is it possible instead to export the models to Python and schedule those instead?
Thanks,
Rob
I don't know when 3.0 will be released as I'm not on the ArcGIS Pro Dev Team (I'm in Training Services). You can export a model to a Python script and use Windows Task Scheduler to run the Python script. There's a blog article that describes the workflow here
This has been driving me nuts all morning. My model works just fine, if I manually click run, if I schedule it, it fails. I tracked it down to the same error 000358.
I'll check out the process to export to a python script, thanks for the tip
I found this youtube very helpful, if you already know models skip about 30 minutes in. https://www.youtube.com/watch?v=pIfS0saxpi8
Were you able to find a solution to this issue? I have a nearly identical model and I am getting the same error (Error 00358: Invalid expression) My model works great when I start it, does not work when scheduled. Very annoying
Have the same issue using the "Select (Analysis)" tool on a scheduled model.... This is the workaround that kinda help me get it to work.
I've notice that the issue only happens when the SQL expression is referring to a numerical field... In my case I needed to select data that are greater than 0 (I'd imagine it would be more complicated if it is another threshold value or ranges), so what I did was:
Hopefully the bug gets fixed soon, it’s a lot of extra steps to get the select working on a scheduled tool.