Select to view content in your preferred language

Script for Updating Occupant Features

1087
5
Jump to solution
03-17-2023 08:14 AM
Andrew-Bowne
Frequent Contributor

(Preface:  I am not much of a Python programmer)

I would like to write a script that will update occupant on a daily interval. One would think this is simple enough using the samples provided in the help documentation.  The issue I am running into is licensing.  When I try to run the script on the server I get a "Error 000824: Tool is not licensed" error.  

The server is running ArcGIS Enterprise but does not have ArcGIS Pro installed on it.  We do have named user Indoors licenses on our Portal.

Is there a way in Python to authenticate to Portal and use a license.  I'm not sure if that is even the correct workflow?

Any suggestions would be greatly appreciated.

 

0 Kudos
1 Solution

Accepted Solutions
KadeSmith
Frequent Contributor

When I setup my daily task up to do the same thing, I ended up having to install ArcGIS Pro on the server. I set up a scheduled task in Pro to run the Python script. After that, in Windows task scheduler I set it up so that the task runs whether the user is logged in or not. 

View solution in original post

5 Replies
KadeSmith
Frequent Contributor

When I setup my daily task up to do the same thing, I ended up having to install ArcGIS Pro on the server. I set up a scheduled task in Pro to run the Python script. After that, in Windows task scheduler I set it up so that the task runs whether the user is logged in or not. 

Andrew-Bowne
Frequent Contributor

Thanks for the input.   Do you need to leave ArcGIS Pro running all the time?

0 Kudos
KadeSmith
Frequent Contributor

No, that's why you want to set it so the task runs whether or not a user is logged in or not. Just make sure you create the scheduled task inside of ArcGIS Pro and not through Windows Task scheduler. Then edit it in Windows Task scheduler.  

Andrew-Bowne
Frequent Contributor

Thanks!  I think I've got it working.  The issue I am not facing is that I am trying to run the Windows Task as a different users (a domain account with restricted access).  This account is an admin on the machine.  When I run I get the dreaded  "0x1" as the last run result.  Any thoughts?

0 Kudos
KadeSmith
Frequent Contributor

Yeah, I had a similar issue. I ended up having to run it as an account on the local machine and couldn't get it to run as a domain account. If you get it running as a domain account, I'd love to hear how you do so. 

0 Kudos