<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>idea Schedule GP History Clean Up in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idi-p/1370815</link>
    <description>&lt;P&gt;It would be great if it were possible the schedule a the clean up geoprocessing history in a project. For example, in the Geoprocessing Options I could set GP history older than 2 weeks to be deleted. If this is not possible then make the GP history accessible via arcpy which can then be cleaned programmatically. I understand that technically this can be done by manipulating the files that make up the APRX but I would prefer not to mess around with them that way to avoid breaking things.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2024 02:38:36 GMT</pubDate>
    <dc:creator>MatthewGeorge</dc:creator>
    <dc:date>2024-01-17T02:38:36Z</dc:date>
    <item>
      <title>Schedule GP History Clean Up</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idi-p/1370815</link>
      <description>&lt;P&gt;It would be great if it were possible the schedule a the clean up geoprocessing history in a project. For example, in the Geoprocessing Options I could set GP history older than 2 weeks to be deleted. If this is not possible then make the GP history accessible via arcpy which can then be cleaned programmatically. I understand that technically this can be done by manipulating the files that make up the APRX but I would prefer not to mess around with them that way to avoid breaking things.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 02:38:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idi-p/1370815</guid>
      <dc:creator>MatthewGeorge</dc:creator>
      <dc:date>2024-01-17T02:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Schedule GP History Clean Up</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idc-p/1380389#M28433</link>
      <description>&lt;P&gt;Have you looked at&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/metadata/metadata-class.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/arcpy/metadata/metadata-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KoryKramer_0-1707494013217.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94296i5C8591C56F0EECF1/image-size/large?v=v2&amp;amp;px=999" role="button" title="KoryKramer_0-1707494013217.png" alt="KoryKramer_0-1707494013217.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 15:53:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idc-p/1380389#M28433</guid>
      <dc:creator>KoryKramer</dc:creator>
      <dc:date>2024-02-09T15:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Schedule GP History Clean Up</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idc-p/1413940#M29583</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/129401"&gt;@KoryKramer&lt;/a&gt;- apologies for not responding sooner, I've been meaning to find the time to test this out. I've attempted to remove the GP history from an APRX file and using this approach doesn't seem to work (code below showing to 2 approaches I tried).&lt;/P&gt;&lt;P&gt;I did a bit of a deeper dive and it looks like the GP history is stored in the projects JSON (GISProject.json).&lt;/P&gt;&lt;P&gt;So really, I'd still like to see a solution available via arcpy OR via the project options.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#set the aprx obj
aprxFile = "&amp;lt;file path&amp;gt;"
aprx = arcpy.mp.ArcGISProject(aprxFile)

#check read only
if not aprx.isReadOnly:
    ### ATTEMPT 1 ###
    #get the metadata obj
    md = aprx.metadata
    #delete
    md.deleteContent("GPHISTORY")
    #save
    md.save()
    aprx.metadata = md
    aprx.save()

    ### ATTEMPT 2 ###
    #get the metadata obj
    md = arcpy.metadata.Metadata(aprxFile)
    #delete
    md.deleteContent("GPHISTORY")
    #save
    md.save()&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 23 Apr 2024 04:20:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idc-p/1413940#M29583</guid>
      <dc:creator>MatthewGeorge</dc:creator>
      <dc:date>2024-04-23T04:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Schedule GP History Clean Up</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idc-p/1587898#M33908</link>
      <description>&lt;P&gt;Has anybody had success in the meantime? when I start with :&lt;/P&gt;&lt;P&gt;aprx = arcpy.mp.ArcGISProject("CURRENT")&lt;BR /&gt;aprx_metadata = aprx.metadata&lt;BR /&gt;print(aprx_metadata.title)&lt;BR /&gt;print(aprx_metadata.description)&lt;/P&gt;&lt;P&gt;I get 2 times "None". Seems like python cannot access the metadata.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 11:37:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idc-p/1587898#M33908</guid>
      <dc:creator>CordulaGöke</dc:creator>
      <dc:date>2025-02-21T11:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Schedule GP History Clean Up</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idc-p/1587903#M33909</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/16369"&gt;@CordulaGöke&lt;/a&gt;- I ended up implementing a solution that unzips the project and removes it from the GISProject.json and then zips it all back up with an aprx extension. We had too many issues with people in the business having excessive history but we don't want to stop people from retaining any history because it can be helpful to rerun tools with the same or similar inputs in a single session. We run a scheduled task that cleans up the projects weekly so it gives users a chance to retain their history during the working week and come back Monday to a clean project.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 12:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idc-p/1587903#M33909</guid>
      <dc:creator>matt_g_g</dc:creator>
      <dc:date>2025-02-21T12:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Schedule GP History Clean Up</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idc-p/1587933#M33910</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/769316" target="_self"&gt;&lt;SPAN class=""&gt;@matt_g_g&lt;/SPAN&gt;&lt;/A&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;In my case, I will just delete the history manually. But have been there unzipping aprxes. I thought it was just me getting such ideas.&lt;/DIV&gt;</description>
      <pubDate>Fri, 21 Feb 2025 13:20:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/schedule-gp-history-clean-up/idc-p/1587933#M33910</guid>
      <dc:creator>CordulaGöke</dc:creator>
      <dc:date>2025-02-21T13:20:31Z</dc:date>
    </item>
  </channel>
</rss>

