I am hoping that this is possible. I am running cache processes (currently through Model Builder) that sometimes last past the time I leave for the day. At the same time, overnight (late) I have routines that run updates and close out my connections to GIS (if it is still open). Occasionally my cache processes will have errors, i.e. the "Failed to Manage tiles.." errors. These show up on the GP window but for some reason do not write out to the GP log file.
# e:\work\runmodel.py import arcpy arcpy.CheckOutExtension("Spatial") # extension, if needed arcpy.ImportToolbox(r"e:\work\mytoolbox.tbx") arcpy.MyModel_mytools() # "mytools" is your toolbox's alias arcpy.AddMessage("Processing completed.")
cd /d e:\work runmodel.py > runmodel.log 2<&1
import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s', filename='/tmp/myapp.log', filemode='w') logging.debug('A debug message') logging.info('Some information') logging.warning('A shot across the bows')
Is there a way to write out percent milestones through python (as far as percent completed) or am I hoping for too much?
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.