Home

 

Configure database clean-up

Edit settings in the news-config.xml file to define the interval at which the databaseCleanup task runs and specify when the IBM WebSphere Application Server scheduler starts the task.

To edit configuration files, use the WebSphere Application Server wsadmin client. See Start wsadmin for details.

The databaseCleanup task ensures that news stories are periodically removed from the news repository. The storyLifetimeInDays setting defines the number of days from the date a story is created before it is removed from the database. To configure the databaseCleanup task...

  1. Use wsadmin to access and check out the news configuration file.

    1. After the wsadmin command environment has initialized, use one of the following commands to initialize the news environment and start the news script interpreter:

      If you are asked to select a server, you can select any server.

    2. Check out the news cell-level configuration file...

      NewsCellConfig.checkOutConfig("<working_dir>", "<cellName>")

      where:

      • <working_dir> is the temporary to which you want to check out the cell-level configuration file. This must exist on the server where you are running wsadmin.

      • <cellName> is the name of the cell that the home page node belongs to. This argument is required even in stand-alone deployments. This argument is also case-sensitive, so type it with care. If you do not know the cell name, do one of the following to determine it:

        • Stand-alone deployment: Look at the name after the following in the file system:

          WAS_HOME/profiles/profile_name/config/cells/

        • Network deployment: From wsadmin...

          print AdminControl.getCell()

      For example:

        NewsCellConfig.checkOutConfig("d:/temp", "NewsServerNode01Cell")
        

      The command displays this message:

        News Cell Level configuration file successfully checked out.
        

  2. Open news-config.xml in a text editor.

  3. Locate the section containing the databaseCleanup task and make the necessary changes. For example, the following code specifies that the news data clean-up task runs every day exactly at 23 hours.

      <task name="NewsDataCleanup"
        interval="0 0 23 ? * *"/>
      

    Use the databaseCleanup element to 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>
      

    Apply property changes


Administer the news repository

 

Related tasks

Apply property changes

Accessing the news configuration file


+

Search Tips   |   Advanced Search