Select to view content in your preferred language

Switched to Named User licensing, Python scheduled tasks now only run with Windows user logged in.

139
0
yesterday
SaraSiskavich
Emerging Contributor

I have two python scripts scheduled nightly and weekly, respectively, in the Task Scheduler of my Win11 machine outfitted with Pro 3.5.6.   The tasks are set to run under my network account.  Until recently they would run regardless of whether I was logged in or not and regardless of whether or not Pro was open or not.  In Pro, I was consuming a concurrent use license on a license server on our local network. 

With the recent mandatory switch to Named User, my two tasks weren’t running at all.  I find I can get them to run normally if I switch back to using my concurrent license server, or with Named User, they will run if I change to “run only when user is logged on.”   Our Portal is ArcGIS online. 

There are lot of older threads on and around this topic recommending using single use or concurrent licensing, but that advice is no longer actionable with the deprecation of those license modalities. Recently, there’s a lot of convo about jobs failing due to expiring named user tokens and whatnot, but I don’t think that’s what’s going on here. I’ve tried many times to sign out/back into AGOL with no change in the behavior of the scheduled jobs.

What is the best practice for my scenario so I can run these jobs without a user logged in?  Should I move the jobs off my workstation to a server?  Run them under a service account?  One of my jobs is a nightly compress/reindex of our trad versioned db, the other is a weekly truncate of AGOL endpoints and subsequent append from our on-prem prod db.  So the running context requires authenticating against SQL Server and being the owner of the published endpoints in AGOL.

P.S I don’t have any spare Named User licenses to throw at this problem. 

P.P.S  the python runs manually in a python window...no problem with the code.

0 Replies