Select to view content in your preferred language

GP history files

513
2
02-25-2020 10:20 PM
ModyBuchbinder
Esri Regular Contributor

I am not sure where to put this question...

We are running python tools on a machine that has server only (no desktop).

We are running the python in "desktop mode" (using batch files), not as gp services.

We use the server license and the server arcpy libraries to run our code.

Each run write an XML into 

c:\users\<<MyUser>>\appdata\roaming\ESRI\Server10.6\ArcToolbox\History

This directory become very big.

Is there any setting that will stop creating this files?

In ArcMap you just have the geoprocessing option but this machine does not has ArcMap installed.

Thanks

Mody

0 Kudos
2 Replies
BlakeTerhune
MVP Regular Contributor

Try using SetLogHistory() at the beginning of the script

arcpy.SetLogHistory(False)
JoeBorgione
MVP Emeritus

This tech support paper ( How To: Delete geoprocessing history from a geodatabase ) provides a basis with which to manage gp history.  Note however that this approach uses arcpy references that as of this writing are not yet available for pro, so you'll need to execute it with a 2.x python/arcpy interpreter. 

That should just about do it....
0 Kudos