Nightly Maintenance
Nightly maintenance is an M-Files operation that does important maintenance tasks to keep your vault healthy. By default, M-Files starts the nightly maintenance every night at 4:30 AM server time. The number of tasks done during the nightly maintenance is different in different contexts. Additionally, you can control which operations are included in the nightly maintenance of a vault.
Nightly maintenance does, for example, these tasks for all vaults where it is enabled:
- Does the full refresh operation for external object types
- Deletes old relogin session IDs
- Starts nightly maintenance for full-text search indices
If the vault uses Microsoft SQL Server as the database engine, nightly maintenance
also does these tasks:
- Updates database statistics from Microsoft SQL Server and starts SQL Server database optimization
- Removes outdated server tasks
- Stops SQL queries that have not completed in the time specified in the Time Limit for SQL Queries nightly maintenance setting
You can configure nightly maintenance to also do these tasks:
- Run automatic workflow state transitions
- To enable this task, set Run Automatic State Changes During Maintenance nightly maintenance setting to Yes.
- Synchronize Microsoft Entra ID user groups and external repository user groups
- To enable this task, set the Run User Group Synchronization Only During Nightly Maintenance nightly maintenance setting to Yes.
Editing nightly maintenance settings
You can control when and how M-Files does nightly maintenance for a vault.
Recommendations:
- In production environments, do not disable nightly maintenance.
- Set nightly maintenance to be done when the vault is not used. Otherwise, it can cause performance issues. By default, nightly maintenance starts at 4:30 AM server time.
- If you have large Microsoft Entra ID user groups, enable Run User Group Synchronization Only During Nightly Maintenance to set the synchronization to be done outside working hours. The synchronization can otherwise have a negative impact on system performance.
- Have one of these two settings enabled:
- Run Automatic State Changes During Maintenance
- Run Automatic State Changes in the Background
To open the nightly maintenance settings of a vault: