Select to view content in your preferred language

Model Builder - Scheduled Task with Secured Service

217
1
09-14-2024 01:12 PM
MeleKoneya
Frequent Contributor

Hello,

I am am running a simple model that uses a secured feature layer and exports its features to GeoJson.

I can run the model in ArcGIS Pro Modelbuilder and everything works as expected.

If I convert that model to run as a scheduled task, nothing happens.   No errors either.

I have access to the secured feature layer via my AD login so I thought maybe I needed to run the task with my credentials but still no luck.   

Do I need to add reference to my ArcGIS Pro project to the script knows how to find the layer? 

Any help is appreciated.

Thank you,

Mele

0 Kudos
1 Reply
JakeSkinner
Esri Esteemed Contributor

@MeleKoneya I would recommend exporting the Model to a python script.  Then, in the script, add the following line:

arcpy.SignInToPortal("https://webadaptorhost.domain.com/webadaptorname", 
                     'username@DOMAIN', 'password')

 If the script executes successfully, you can easily schedule this as well.  Check out the document here.

0 Kudos