We have a customer that is using arcpy to run scripts on a schedule. To ensure there is a license available, they have set up a named user and assigned a pro license and have then taken that license offline for the user account that is running the python scripts. However, periodically the license seems to be returned automatically and it must then be manually checked out again.
I cannot find anything in the documentation that suggests there is a timeout or time limitation on check out of the license. Can anyone confirm if there is a timeout for taking a license offline and if so, what the time period is?
The customer is currently using ArcGIS Pro 2.8.x.
Solved! Go to Solution.
If you take a Named User configured with ArcGIS Enterprise, it is available for 30 days before it is automatically return to the license manager. You will need to take the license offline again afterward.
There is an existing enhancement request to allow an admin to determine how long a user can take a license offline, ENH-000151003.
How often is the schedule? Not sure about taking it offline, but regular Named user will time out after 14 days of no login I think it is. Also, even if offline, if it is connecting to Portal data, it will need to be logged in as well.
I have a scheduled task that opens/closes Pro every monday night just to keep my sign in active.
Also, when you say "checked out again", do you mean the Authorize ... box gets unchecked and you have to re-check it?
R_
That's useful to know. However, it's not connecting to portal at all, so there should not be a requirement to sign in. The whole point of taking a license offline is to remove the need to connect to portal.
Yes - when I say it needs to be manually checked out again. Basically, when there are issues with the license, when you log in as that user, the "Authorize ArcGIS Pro to work offline" option has become un-checked. Manually checking that option and closing ArcGIS Pro fixes the issue.
The workaround to have a task run on a schedule to sign in regularly may be an option, but this shouldn't be required in my opinion. The license should stay checked out/offline until it's manually checked back in.
@RhettZufelt - regarding "I have a scheduled task that opens/closes Pro every monday night just to keep my sign in active." Can you provide details on this? I've been digging through the arcpy documentation without luck to find a function that will do this because I'm having issues with my account logging out of its connection to our Portal, presumably due to inactivity.
I created a .bat file tha opens a python script using python 3.x:
@echo Run my Python script
call "C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\propy" "D:\GISData\PublicWorks\ESRI_Automation\Scripts\_PW\Toolbox\Pro_Reup.py"
@echo Finished
And the python script that is runs starts ArcGSIS Pro, waits 30 seconds, then closes pro:
import os
import time
#Assign the Pro path on the machine, usually here
ArcGIS_Pro_filepath = r"C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe"
#Use os.startfile(), this will launch ArcPro
os.startfile(ArcGIS_Pro_filepath)
#Use time.sleep() to wait 30 seconds, enough time for ArcPro to open properly
time.sleep(30)
#Use os.system() to forcefully quit named process, ArcGISPro.exe
os.system("taskkill /f /im ArcGISPro.exe")
Then I use scheduled tasks in Widows to run the *.bat file once a week.
For this to work, you need to check the Sign In Automatically box in Pro sign in page.
R_
Offline lets you open Pro when not signed into a Portal, but, if any of you data that is being access by the script is in a portal (and is not public) , will still need to log in to connect to the data itself.
That is what I was thinking "may" be going on.
Otherwise, I'm no help on the offline license thing. Tried it once, got disconnected, and was several days working with tech support before I got Pro working again.
On that same note, the last user that logged into Pro (under that windows account running the script) seems to be the credentials that it caches. I have had some of my scripts fail when the last username logged into Pro is a user that doesn't have creds to run the script(s). I have to log out of Pro, then log back in with proper credentials. Then, it will stick for two weeks, or until someone else logs in.
R_
If you take a Named User configured with ArcGIS Enterprise, it is available for 30 days before it is automatically return to the license manager. You will need to take the license offline again afterward.
There is an existing enhancement request to allow an admin to determine how long a user can take a license offline, ENH-000151003.
Thanks for confirming. If that's the case, it would be useful if this was stated in the documentation.
It would also be good to know if there's an automated way (through arcpy or .net SDK) to check out a license?