---
title: CleanUpTimerInterval System Parameter – How Often the Logging Service Cleanup Runs
description: CleanUpTimerInterval sets how often the Nodinite Logging Service runs its cleanup, which deletes Log Events, message bodies, context, error events, Log Audits, and incomplete events past their retention. Default 1 hour.
---

# CleanUpTimerInterval - System Parameter

The **CleanUpTimerInterval** [System Parameter][System Parameters] sets the time, in milliseconds, between two cleanup runs of the [Logging Service][]. Each cleanup run deletes logged data that is older than its retention setting; the retention rules themselves are described in the Logging Service [Data Retention][] section.

![A Log View with three test orders from three days ago, on a Message Type that keeps events 1 day; CleanUpTimerInterval opened from the System Parameters list, changed from 3600000 to 600000 and saved; after the next cleanup run the Log View finds no result, and Log Audit Search shows the entry Removed 3 Events of Message Type 'Contoso.OrderDesk.TestOrder/2.0' older than 1 day(s), by Log_MessageData_DeleteOldEventsAndData, animated walkthrough (7.12)][1]  
*Animated walkthrough: with a shorter interval, the next cleanup run removes the expired test orders, and the [Log Audit][Log Audits] records what it removed.*

## :fa-table: At a Glance {#at-a-glance}

| Property | Value |
| --- | --- |
| Key | `CleanUpTimerInterval` |
| Data type | integer (milliseconds) |
| Default | `3600000` (1 hour) |
| Read by | [Logging Service][] |
| Takes effect | The Logging Service checks the value every 10 minutes; no restart needed |
| Status | ✅ Active |

## :fa-gears: How It Works

The Logging Service wakes every 10 minutes and starts a cleanup run when the interval has passed since the end of the previous run. A cleanup also runs each time the Logging Service starts. Because of the 10-minute wake-up, a value below `600000` still gives about one run every 10 minutes.

Each cleanup run of the Logging Service deletes, in the [Log Databases][Log Database]:

* :fa-envelope-open-text: Processed [Log Events][Log Event], message bodies, and context properties older than their [Message Type][]'s *Days to keep* values, measured on the events' LogDateTime. New Message Types get these values from [DaysToKeepMessageEventsDefault][], [DaysToKeepMessageDataDefault][], and [DaysToKeepMessageContextDefault][].
* :fa-calendar-xmark: Error events without data older than [DaysToKeepErrorEventsWithoutData][].
* :fa-user-tag: Log Audit records older than [DaysToKeepLogAudits][].
* :fa-hourglass-end: Unprocessed Log Events without a Message Type, and incomplete BizTalk message data, older than [MissingEventsDays][].

The [Log Audit][Log Audits] records each run. The run starts with *Started to clean Log Database '…'* and ends with *Completed the cleaning of Log Database '…'*. In between, each Message Type with expired events gets one entry. From 7.13 it reads *Selected N Events of Message Type '…' (Id N) for removal, older than N day(s) (…), in Log Database '…' on server '…'.* Before 7.13 it read *Removed N Events of Message Type '…' older than N day(s)*. A related setting, CleanUpOverdueInterval (default 24 hours), decides whether a cleanup may interrupt event processing that is working off a backlog.

This parameter sets only *how often* the cleanup runs, not *how long* data is kept. [Monitor Events][] are not part of this cleanup: the [Monitoring Service][] purges them every hour, based on [DaysToKeepMonitorEvents][].

## :fa-lightbulb: Choosing a Value

* Keep the default `3600000` (1 hour) unless you have a reason to change it.
* A longer interval lets expired data stay in the Log Database a little longer and makes each cleanup run delete more rows at once.
* A shorter interval spreads the deletes over more, smaller runs. Consider it when expired data piles up between runs on a busy system, and avoid very short intervals that keep the database busy with cleanup.

## :fa-hand-point-right: Next Steps

* :fa-trash-can: [Data Retention][]  
* :fa-file: [Add or manage Message Type][]  
* :fa-pen-to-square: [Manage System Parameters][]  

## :fa-link-horizontal: Related Topics

* :fa-envelope-open-text: [DaysToKeepMessageEventsDefault][]  
* :fa-file-code: [DaysToKeepMessageDataDefault][]  
* :fa-key: [DaysToKeepMessageContextDefault][]  
* :fa-calendar-xmark: [DaysToKeepErrorEventsWithoutData][]  
* :fa-user-tag: [DaysToKeepLogAudits][]  
* :fa-hourglass-end: [MissingEventsDays][]  
* :fa-chart-line: [DaysToKeepMonitorEvents][]  
* :fa-hard-drive: [Logging Service][]  
* :fa-cog: [System Parameters][]  

[1]:{ndm}/Documentation%20Pictures/IM/CoreServices/ConfigurationDatabase/SystemParameters/SystemParameters_CleanUpTimerInterval.gif

[Add or manage Message Type]:{ndr}/Getting%20Started/4.%20Repository/Message%20Types/Add%20or%20manage%20Message%20Type.md
[Data Retention]:{ndr}/Core%20Services/Logging%20Service/Overview.md#data-retention
[DaysToKeepErrorEventsWithoutData]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/DaysToKeepErrorEventsWithoutData.md
[DaysToKeepLogAudits]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/DaysToKeepLogAudits.md
[DaysToKeepMessageContextDefault]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/DaysToKeepMessageContextDefault.md
[DaysToKeepMessageDataDefault]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/DaysToKeepMessageDataDefault.md
[DaysToKeepMessageEventsDefault]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/DaysToKeepMessageEventsDefault.md
[DaysToKeepMonitorEvents]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/DaysToKeepMonitorEvents.md
[Log Audits]:{ndr}/Administration/6.%20Tools/2.%20Log%20Audit%20Search.md
[Log Database]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Manage System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Manage%20System%20Parameters.md
[Message Type]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[MissingEventsDays]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/MissingEventsDays.md
[Monitor Events]:{ndr}/Core%20Services/Monitoring%20Service/Features/What%20is%20a%20Monitoring%20Event.md
[Monitoring Service]:{ndr}/Core%20Services/Monitoring%20Service/Overview.md
[System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Overview.md