{"id":22363,"date":"2026-07-31T06:45:36","date_gmt":"2026-07-31T06:45:36","guid":{"rendered":"https:\/\/tenthplanet.in\/idempiere\/?p=22363"},"modified":"2026-08-13T04:48:01","modified_gmt":"2026-08-13T04:48:01","slug":"how-to-run-the-housekeeping-process-in-idempiere","status":"publish","type":"post","link":"https:\/\/tenthplanet.in\/idempiere\/how-to-run-the-housekeeping-process-in-idempiere\/","title":{"rendered":"How to Run the HouseKeeping Process in iDempiere"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The HouseKeeping window in iDempiere lets retailers schedule automatic cleanup of high-volume transactional tables such as report statements and temporary staging data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before deleting rows, the process can archive them to a history table or export them as XML backups. This directly affects system performance, report generation speed, and storage costs across busy retail environments with daily POS and inventory activity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Process Flow<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"379\" src=\"https:\/\/tenthplanet.in\/idempiere\/wp-content\/uploads\/sites\/13\/2026\/07\/TenthPlanet-iDempiere-HouseKeeping-1024x379.png\" alt=\"\" class=\"wp-image-22365\" title=\"\" srcset=\"https:\/\/tenthplanet.in\/idempiere\/wp-content\/uploads\/sites\/13\/2026\/07\/TenthPlanet-iDempiere-HouseKeeping-1024x379.png 1024w, https:\/\/tenthplanet.in\/idempiere\/wp-content\/uploads\/sites\/13\/2026\/07\/TenthPlanet-iDempiere-HouseKeeping-300x111.png 300w, https:\/\/tenthplanet.in\/idempiere\/wp-content\/uploads\/sites\/13\/2026\/07\/TenthPlanet-iDempiere-HouseKeeping-768x284.png 768w, https:\/\/tenthplanet.in\/idempiere\/wp-content\/uploads\/sites\/13\/2026\/07\/TenthPlanet-iDempiere-HouseKeeping-1536x568.png 1536w, https:\/\/tenthplanet.in\/idempiere\/wp-content\/uploads\/sites\/13\/2026\/07\/TenthPlanet-iDempiere-HouseKeeping.png 1953w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Business Rules<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Only active HouseKeeping configurations are available for selection at runtime.<\/li>\n\n\n\n<li>Each configuration targets one table using an optional WHERE clause to limit affected rows.<\/li>\n\n\n\n<li>Records can be archived to a history table (hst_&lt;table&gt;) before deletion.<\/li>\n\n\n\n<li>Records can be exported as XML backup files before deletion.<\/li>\n\n\n\n<li>Deleted record count and last run date are updated automatically after each execution.<\/li>\n\n\n\n<li>The process can be run interactively or submitted as a background job.<\/li>\n\n\n\n<li>If no WHERE clause is defined, all rows in the target table are deleted.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Prerequisites<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>HouseKeeping configuration record created.<\/li>\n\n\n\n<li>Target table identified in the Application Dictionary.<\/li>\n\n\n\n<li>WHERE clause tested and validated for correct row selection.<\/li>\n\n\n\n<li>Backup folder path configured and accessible, if XML export is enabled.<\/li>\n\n\n\n<li>History table (hst_&lt;tablename&gt;) exists, if Save in Historic is enabled.<\/li>\n\n\n\n<li>User has System Administrator role access to run the process.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Navigation<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Menu \u2192 System Admin \u2192 General Rules \u2192 Server \u2192 House Keeping<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Configuration Steps<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Identify the Target Table and Data Volume<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the Application Dictionary, note the table name and its growth pattern. Decide a retention period, for example preserving the last week of data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Create the House Keeping Configuration Record<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open the House Keeping window, enter a Name, select the target table, and enter a WhereClause to filter rows outside the retention period.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Field Reference<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Field<\/strong><\/td><td><strong>Sample Value<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Name<\/td><td>Delete T_ReportStatement records preserving last week<\/td><td>Identifies the configuration in the dropdown<\/td><\/tr><tr><td>AD_Table_ID<\/td><td>T_ReportStatement<\/td><td>Target table for cleanup<\/td><\/tr><tr><td>WhereClause<\/td><td>Created &lt; (SysDate &#8211; 7)<\/td><td>Limits deletion to records older than 7 days<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Configure Historic Backup<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Enable IsSaveInHistoric to copy matching rows into hst_&lt;tablename&gt; before the delete step runs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Field Reference<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Field<\/strong><\/td><td><strong>Sample Value<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>IsSaveInHistoric<\/td><td>Yes<\/td><td>Preserves a copy of deleted rows in the history table<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Configure XML Export Backup (Optional)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Enable IsExportXMLBackup and set a BackupFolder path. The process writes a file named tablename plus timestamp with an .xml extension.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Field Reference<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Field<\/strong><\/td><td><strong>Sample Value<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>IsExportXMLBackup<\/td><td>Yes<\/td><td>Enables file-based export before deletion<\/td><\/tr><tr><td>BackupFolder<\/td><td>\/idempiere\/backups\/housekeeping<\/td><td>Storage path for the exported XML file<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5: Run the HouseKeeping Process<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open the House Keeping window, select a configuration from the dropdown, optionally check Run as Job, then click Start.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Field Reference<\/strong><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 6: Review the Process Result<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After execution, review the &#8220;@Deleted@&#8221; count message. Reopen the configuration record to verify LastRun and LastDeleted were updated.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common Issues and Resolutions<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Issue<\/strong><\/td><td><strong>Cause<\/strong><\/td><td><strong>Resolution<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Process deletes more rows than expected<\/td><td>WhereClause is missing or too broad<\/td><td>Add a specific date or status filter before running in production<\/td><\/tr><tr><td>&#8220;Cannot insert into hst_&#8221; error<\/td><td>History table does not exist for the target table<\/td><td>Create the matching hst_&lt;tablename&gt; table before enabling Save in Historic<\/td><\/tr><tr><td>XML export file is not created<\/td><td>Backup folder path is invalid or inaccessible<\/td><td>Verify the folder exists and the application server has write permission<\/td><\/tr><tr><td>Configuration not visible in dropdown<\/td><td>Record is marked inactive<\/td><td>Activate the HouseKeeping configuration record<\/td><\/tr><tr><td>Deleted count returns zero<\/td><td>WhereClause matches no current rows<\/td><td>Review the clause syntax against the current data range<\/td><\/tr><tr><td>Large table deletion times out<\/td><td>No index on the filtered column<\/td><td>Add an index on the filter column or submit the process as a Job<\/td><\/tr><tr><td>Unexpected duplicate rows in history table<\/td><td>Same configuration rerun over overlapping data<\/td><td>Adjust WhereClause so each run only targets new, undeleted rows<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Next Steps<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Configure the Scheduler window to automate recurring HouseKeeping runs.<\/li>\n\n\n\n<li>Review Application Dictionary table definitions for other candidate tables.<\/li>\n\n\n\n<li>Set up backup folder monitoring for XML export files<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The HouseKeeping window in iDempiere lets retailers schedule automatic cleanup of high-volume transactional tables such as report statements and temporary [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,92],"tags":[],"class_list":["post-22363","post","type-post","status-publish","format-standard","hentry","category-idempiere-product","category-idempiere-data"],"_links":{"self":[{"href":"https:\/\/tenthplanet.in\/idempiere\/wp-json\/wp\/v2\/posts\/22363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tenthplanet.in\/idempiere\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tenthplanet.in\/idempiere\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/idempiere\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/idempiere\/wp-json\/wp\/v2\/comments?post=22363"}],"version-history":[{"count":3,"href":"https:\/\/tenthplanet.in\/idempiere\/wp-json\/wp\/v2\/posts\/22363\/revisions"}],"predecessor-version":[{"id":22367,"href":"https:\/\/tenthplanet.in\/idempiere\/wp-json\/wp\/v2\/posts\/22363\/revisions\/22367"}],"wp:attachment":[{"href":"https:\/\/tenthplanet.in\/idempiere\/wp-json\/wp\/v2\/media?parent=22363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tenthplanet.in\/idempiere\/wp-json\/wp\/v2\/categories?post=22363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tenthplanet.in\/idempiere\/wp-json\/wp\/v2\/tags?post=22363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}