Clean-up task for user trail logs in database

The user trail logs in the database can be cleaned-up periodically by a scheduled task service.

  1. In the Config Editor, go to:
    Service Container >> Services >> Task Scheduler Config >> Service
  2. In the Task Scheduler Service view:
    • In the property Tasks, add and configure a new Task Schedule plugin.
  3. In the Task Schedule view:
    • Configure the property Task with the Plugin class User Trail Log Clean-up Task.
    • Set property Interval according to your requirements, e.g., to run the task daily.
    • For property Name, add a task name. This name is displayed name on the Service Container page.
  4. In the User Trail Log Clean-up Task view:
    • For property Database Repository, select the corresponding user trail database.
    • For property Log Retention Time, set the duration to keep user trail log entries in the database after creation.
    • For property Batch Size select a value that will lock the User Trail Log Database during clean-up for no longer than 5 seconds. Start with the default setting and check the time required for a clean-up run later.
  5. Activate the new configuration.
  6. Click on the Adminapp UI menu Service Container to open the Service Container page.
  7. The configured clean-up task appears in the menu Task Scheduler Service.
  8. Start the cleanup task manually to check the current task settings.
    • Check the servicecontainerapp.log file after running this task for detailed execution time information.
    • If the execution time is longer than 5 seconds, you may adjust the Batch Size settings. Note that this setting strongly depends on your environment and the number of log lines in the database.