+

Search Tips   |   Advanced Search

Configure database clean-up for the News repository


Overview

Edit settings in news-config.xml to define the interval at which the different database clean-up tasks run and specify when the IBM WebSphere Application Server scheduler starts the tasks.

The database clean-up tasks defined in news-config.xml ensure that content that is out-of-date is periodically removed from the News repository. We can update the following properties for these tasks:

If database clean-up tasks are disabled, we run the risk of rapidly reaching the file system storage limit as the database increases in size. Disabling these tasks can also result in poor data access performance.


Configure database clean-up tasks

  1. Check out the News cell-level configuration file :

    To get cellname...

  2. Edit news-config.xml

  3. Locate the section of the file containing the database clean-up tasks and make the necessary changes.

    • To update the News data clean-up task:

      1. Enable or disable the task by setting "enabled" parameter. Default is enabled, running every day exactly at 23 hours.
        <task name="NewsDataCleanup" 
              description="Job to clean up the news"
              interval="0 0 23 ? * *" 
              startby="" 
              enabled="true" 
              scope="cluster" 
              type="internal"
              targetName="ScheduledTaskService" 
              mbeanMethodName="" 
              serverName="unsupported" >
        </task>

      2. Specify the interval at which news stories are deleted from the News repository:

        For example, the following code specifies that news stories are deleted from the database when they are more than 30 days old.

        <databaseCleanup>
        ...
          <storyLifetimeInDays>30</storyLifetimeInDays>
        </databaseCleanup>

    • To update the ReplyToId clean-up task:

      1. Enable or disable the task by setting "enabled" parameter. Default enabled, and running weekly.
        <!-- This task run periodically to purge the system of expired ReplyTo Id records>
          <task  serverName="unsupported"
            startby=""
            mbeanMethodName=""
            targetName="ScheduledTaskService"
            type="internal"
            scope="cluster"
            enabled="true"
            interval="0 0 4 ? * SAT"
            description="Job to cleanup Expired ReplyTo Id records"
            name="ReplyToIdCleanup" >
          </task>

      2. Set the expiry date for the ReplyTo IDs that enable users to reply to notifications about forum posts directly in the forum:

        For example, specify that ReplyTo IDs are deleted from the database when they are 365 days old.

        <databaseCleanup>
          ...
          <replyToIdLifetimeInDays>365</replyToIdLifetimeInDays>
        </databaseCleanup>
        

    • To update the ReplyToAttachment clean-up task:

      1. Enable or disable the task by setting "enabled" parameter. Default is enabled, running weekly.
        <!-- This task runs periodically to remove any replyTo attachments 
                that were not properly removed from the shared data store -->
        
          <task  serverName="unsupported"
            startby=""
            mbeanMethodName=""
            targetName="ScheduledTaskService"
            type="internal"
            scope="cluster"
            enabled="true"
            interval="0 0 4 ? * SUN"</p><p>
            description="Job to cleanup Expired ReplyTo Attachment Files"
            name="ReplyToAttachmentCleanup" >
          </task>

      2. Specify the number of days to keep mailed-in reply attachments and folders on the file system before deleting them:

        For example, the following code specifies that any resource stored by the system is to be deleted after 7 days.

        <databaseCleanup>
        ...
          <!-- The number of days before the system will remove any replyTo attachments that were not properly removed from the shared data store. -->
          <replyToAttachmentLifetimeInDays>7</replyToAttachmentLifetimeInDays>
        </databaseCleanup>

  4. Check the configuration files back in.

    Do so during the same wsadmin session in which you checked them out for the changes to take effect.


Parent topic:
Administer the News repository


Related:
Apply property changes in the News repository
Access the News configuration file
Manage scheduled tasks for the News repository
Purge compromised reply-to IDs