---
title: "System table cleanup records"
site: admin
version: 2027.1
versions: "all"
url: https://docs-new.servicely.ai/admin/2027.1/platform/jobs-and-logs/system-table-cleanup-records/
type: reference
application: platform
last_updated: 2026-12-03
commit: 8d233372fa05
---


A system table cleanup record deletes records from a high-volume table once they pass a set age. Look up its fields and the default records here. You need the `administrator` role, and the records are under **System & deployment → Housekeeping → System table cleanup** in the Administration workspace.

<Image src="asset:screenshots/admin/platform-jobs-and-logs-system-table-cleanup-records/cleanup-form.png">The Job request cleanup record, with Table, Date field, Maximum age in seconds and a Condition on State.</Image>

## Fields

<!-- source: platform/data/ViewDefinition?Table=SystemTableCleanup -->
| Field | Type | Required | Behaviour | Purpose |
| --- | --- | --- | --- | --- |
| Name | Text | Yes | None. | The name of the cleanup record. |
| Active | Yes or no | No | Default: Yes. A record that is not active does not run. | Turns the cleanup on. |
| Table | Table | Yes | None. | The table whose old records are deleted. |
| Maximum age in seconds | Integer | Yes | Default: 604800, which is 7 days. | How long after the **Date field** a record is kept. 2592000 is 30 days and 7776000 is 90 days. |
| Date field | Field | Yes | Lists the fields of the chosen **Table**. | The date the age is counted from. |
| Condition | Condition | No | None. | Limits the cleanup to records that match. |

## How it runs

The "System table cleanup" job runs every active cleanup record each day at 01:00, in the instance time zone. A record is deleted when its **Date field** value plus **Maximum age in seconds** is in the past and it matches the **Condition**. A cleanup record that fails does not stop the others.

Servicely creates a cleanup record for each new import staging table, named "Import staging cleanup" and the table name. It keeps staging records for 3 days.

<!-- code: servicely-core/src/main/kotlin/com/servicely/scripting/util/AdminUtilsWrapper.kt:120 -->
<!-- code: servicely-core/src/main/kotlin/com/servicely/importing/ImportManager.kt:712 -->

## Default records

The platform application supplies these records, and all are active. Other applications add their own. The **Table** and **Date field** columns give the values as the list shows them.

<!-- source: platform/data/SystemTableCleanup -->
| Name | Table | Date field | Kept for | Condition |
| --- | --- | --- | --- | --- |
| AI change revision cleanup | SystemAIChangeRevision | CreatedOn | 365 days | None |
| AI context compaction cleanup | SystemAgentContextCompaction | CreatedOn | 90 days | None |
| AI context stored content cleanup | SystemAgentContextArtifact | CreatedOn | 90 days | None |
| AI Spend Alert Cleanup | SystemAISpendAlert | CreatedOn | 365 days | None |
| Async Queue Cleanup | Async queue | UpdatedOn | 30 days | State is processed or error |
| Configuration review findings cleanup | SystemConfigurationFinding | UpdatedOn | 180 days | Status is applied, dismissed or superseded |
| Engagement event cleanup | Engagement event | CreatedOn | 90 days | None |
| Engagement feedback cleanup | Engagement feedback | CreatedOn | 90 days | None |
| Expired password reset link cleanup | System nonce | Expires | 7 days | Type is a password reset or a password reset request |
| Import load cleanup | Import load | UpdatedOn | 7 days | None |
| Import log cleanup | Import log | UpdatedOn | 7 days | None |
| Import run cleanup | ImportRun | FinishedOn | 30 days | State is completed, completed with errors, stopped, halted, abandoned or skipped |
| Job request cleanup | Job request | UpdatedOn | 7 days | State is completed |
| MCP audit log cleanup | SystemMCPAuditLog | CreatedOn | 7 days | None |
| Script API lookup miss cleanup | SystemScriptApiLookupMiss | LastSeen | 180 days | None |
| Server script execution history cleanup | SystemServerScriptExecution | StartedOn | 30 days | None |
| System Event Cleanup | System event | UpdatedOn | 7 days | State is not ready |
| System Event Cleanup - Unprocessed | System event | UpdatedOn | 90 days | State is ready |
| System log record cleanup | System log record | CreatedOn | 7 days | None |
| SystemAIPromptExecution cleanup | AI Prompt Execution | CreatedOn | 30 days | None |
| SystemInboundWebhookEvent cleanup | SystemInboundWebhookEvent | CreatedOn | 30 days | None |
| Unfinished import run cleanup | ImportRun | UpdatedOn | 30 days | State is running |
| Webhook Delivery Log Cleanup | WebhookDeliveryLog | CreatedOn | 30 days | None |
| WorkAssignmentLog cleanup | WorkAssignmentLog | CreatedOn | 365 days | None |

## Related

- [Scheduled jobs and job queues](page:platform/jobs-and-logs/jobs)
- [Set log levels and read system logs](page:platform/jobs-and-logs/logging)
- [How data import works](page:data-import/how-data-import-works)
