# Cleanup Completed Monitor Directory Job

Removes old files from the monitor directory's Completed subfolder and from the service's log folder.

Configuration: SettingsCfg.Provisioning.CleanupCompletedMonitorDirectory / CleanupCompletedMonitorDirectoryFilters — see Global Settings Configuration.

Schedule: Runs once daily, at a random time between 00:00 and 06:00. The time is not configurable.

# Purpose

The monitor directory's Completed subfolder accumulates one file per successfully processed input file, and the Log folder accumulates log files, both indefinitely unless cleaned up. This job deletes files older than a configured number of days from both locations.

# Configuration

# CleanupCompletedMonitorDirectory

  • Type: int
  • Default: 14
  • Description: Age, in days, after which files are removed. Files with a last-write time older than this many days are deleted. Set to 0 to disable the job entirely.

# CleanupCompletedMonitorDirectoryFilters

  • Type: string (list)
  • Default: ["json"]
  • Description: File extensions to remove from the Completed subfolder. Leave empty to remove files of any extension. Only applies to the monitor directory cleanup — the log folder cleanup always targets *.log files regardless of this setting.

# How It Works

  1. Monitor directory cleanup — for each extension in CleanupCompletedMonitorDirectoryFilters (or all files, if empty), deletes files in {MonitorDirectory}\Completed\ whose last-write time is older than CleanupCompletedMonitorDirectory days.
  2. Log directory cleanup — deletes *.log files anywhere under the service's Log folder (recursively) whose last-write time is older than the same CleanupCompletedMonitorDirectory day count.

Only the Completed subfolder is cleaned — files in Error are left in place indefinitely so failures remain visible until manually addressed.

Warning: The default filter (["json"]) removes completed ClientMatter_*.json files. The ClientMatter JSON de-duplication check (see Client Matter execution flow → Duplicate-file avoidance) looks at the Completed subfolder to detect an unchanged resubmission. Once this job removes a file's completed copy, that comparison no longer has anything to match against, and a resubmission of the same unchanged matter update will be reprocessed instead of skipped.

Last Updated: 7/7/2026, 1:48:24 PM