Configure database clean-up for the News repository 

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


Before you begin

To edit configuration files, use the WAS wsadmin client. See Starting the wsadmin client for details.


About this task

The databaseCleanup task ensures that news stories are periodically removed from the News repository. You can update the following properties for this task:

enabled

interval


Procedure

To configure the databaseCleanup task...

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      execfile("newsAdmin.py")

      If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  2. Check out the News cell-level configuration file using the following command:

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

      where:

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

          Note: AIX and Linux only: The directory must grant write permissions or the command will not run successfully.

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

          print AdminControl.getCell()

      For example:

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

      The command displays this message:

      News Cell Level configuration file successfully checked out.

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

  • Locate the section containing the databaseCleanup task and make the necessary changes.

  • Use the <databaseCleanup> element to specify the interval at which news stories are deleted from the News repository.

  • After making changes, check the configuration files back in, and do so during the same wsadmin session in which you checked them out for the changes to take effect. See Apply property changes in the News repository for information about how to save and apply your changes.


    Parent topic

    Administer the News repository


    Related tasks


    Apply property changes in the News repository
    Access the News configuration file
    Manage scheduled tasks for the News repository


       

     

    });