Purge Message History batch process

Code

PurgeMessageHistory

Categories

UIRunnable, Schedulable

Implementation

Batch process

Stoppable

No (single phase process)

Schedule

On the 20th of the month, at 1:00 a.m.

Class

PurgeMessageHistory.gs

The Purge Message History batch process purges old messages from the message history table. The KeepCompletedMessagesForDays parameter in config.xml specifies how many days a message can remain in the message history table before the Purge Message History process removes the message. The default value of KeepCompletedMessagesForDays is 90 days.

The doWork method on the PurgeMessageHistory class calls the MessagingUtil.removeMessageHistory method to delete message history that is older than the current date minus the value of KeepCompletedMessagesForDays.

See also