---
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.*

<h2 id="at-a-glance"><i class="fal fa-table" aria-hidden="true"></i> At a Glance</h2>

| 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 |

## <i class="fal fa-gears" aria-hidden="true"></i> 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]:

* <i class="fal fa-envelope-open-text" aria-hidden="true"></i> 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][].
* <i class="fal fa-calendar-xmark" aria-hidden="true"></i> Error events without data older than [DaysToKeepErrorEventsWithoutData][].
* <i class="fal fa-user-tag" aria-hidden="true"></i> Log Audit records older than [DaysToKeepLogAudits][].
* <i class="fal fa-hourglass-end" aria-hidden="true"></i> 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][].

## <i class="fal fa-lightbulb" aria-hidden="true"></i> 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.

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-trash-can" aria-hidden="true"></i> [Data Retention][]  
* <i class="fal fa-file" aria-hidden="true"></i> [Add or manage Message Type][]  
* <i class="fal fa-pen-to-square" aria-hidden="true"></i> [Manage System Parameters][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-envelope-open-text" aria-hidden="true"></i> [DaysToKeepMessageEventsDefault][]  
* <i class="fal fa-file-code" aria-hidden="true"></i> [DaysToKeepMessageDataDefault][]  
* <i class="fal fa-key" aria-hidden="true"></i> [DaysToKeepMessageContextDefault][]  
* <i class="fal fa-calendar-xmark" aria-hidden="true"></i> [DaysToKeepErrorEventsWithoutData][]  
* <i class="fal fa-user-tag" aria-hidden="true"></i> [DaysToKeepLogAudits][]  
* <i class="fal fa-hourglass-end" aria-hidden="true"></i> [MissingEventsDays][]  
* <i class="fal fa-chart-line" aria-hidden="true"></i> [DaysToKeepMonitorEvents][]  
* <i class="fal fa-hard-drive" aria-hidden="true"></i> [Logging Service][]  
* <i class="fal fa-cog" aria-hidden="true"></i> [System Parameters][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/CoreServices/ConfigurationDatabase/SystemParameters/SystemParameters_CleanUpTimerInterval.gif

[Add or manage Message Type]:https://docs.nodinite.com/getting-started/repository/message-types/add-or-manage-message-type/
[Data Retention]:https://docs.nodinite.com/core-services/logging-service/overview/#data-retention
[DaysToKeepErrorEventsWithoutData]:https://docs.nodinite.com/administration/settings/system-parameters/daystokeeperroreventswithoutdata/
[DaysToKeepLogAudits]:https://docs.nodinite.com/administration/settings/system-parameters/daystokeeplogaudits/
[DaysToKeepMessageContextDefault]:https://docs.nodinite.com/administration/settings/system-parameters/daystokeepmessagecontextdefault/
[DaysToKeepMessageDataDefault]:https://docs.nodinite.com/administration/settings/system-parameters/daystokeepmessagedatadefault/
[DaysToKeepMessageEventsDefault]:https://docs.nodinite.com/administration/settings/system-parameters/daystokeepmessageeventsdefault/
[DaysToKeepMonitorEvents]:https://docs.nodinite.com/administration/settings/system-parameters/daystokeepmonitorevents/
[Log Audits]:https://docs.nodinite.com/administration/tools/log-audit-search/
[Log Database]:https://docs.nodinite.com/core-services/log-databases/overview/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Logging Service]:https://docs.nodinite.com/core-services/logging-service/overview/
[Manage System Parameters]:https://docs.nodinite.com/administration/settings/system-parameters/manage-system-parameters/
[Message Type]:https://docs.nodinite.com/repository-model/message-types/overview/
[MissingEventsDays]:https://docs.nodinite.com/administration/settings/system-parameters/missingeventsdays/
[Monitor Events]:https://docs.nodinite.com/core-services/monitoring-service/features/what-is-a-monitoring-event/
[Monitoring Service]:https://docs.nodinite.com/core-services/monitoring-service/overview/
[System Parameters]:https://docs.nodinite.com/administration/settings/system-parameters/overview/