Edit settings in the news-config.xml
file to define the interval at which the databaseCleanup task runs and specify when the IBM
® Application Server scheduler starts the task.
Before you begin
To edit configuration files, you must use the WebSphere
Application Server wsadmin client. See Starting the wsadmin client
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:
Enables or disables the database cleanup task. This property takes a Boolean value, true or false. The value must be formatted in lowercase.interval
Specifies the interval at which the database cleanup task runs. This property is a string value that must be specified in Cron format. For more information about the Cron schedule, see Scheduling tasks.
To configure the databaseCleanup task, complete the following steps.
Parent topic: Administering the News repository
Applying property changes in the News repository
Accessing the News configuration file
Managing scheduled tasks for the News repository
- Start the wsadmin client from the following directory of the system on which you installed the Deployment Manager:
is the WebSphere
Application Server installation directory and <dm_profile_root>
is the Deployment Manager profile directory, typically dmgr01.
You must start the client from this directory or subsequent commands that you enter do not execute correctly.
- Start the News Jython script interpreter.
- Use the following command to access the News configuration file:
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, you must pick the node where the file is stored.
- Check out the News cell-level configuration file using the following command:
- <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:
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.
For example, the following code specifies that the News data clean-up task is enabled and runs 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" >
- 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.
Do not disable the databaseCleanup setting. If you disable it, you run the risk of rapidly reaching your file system storage limit as the database increases in size. Disabling this setting can also result in poor data access performance.
- After making changes, you must check the configuration files back in, and you must do so during the same wsadmin session in which you checked them out for the changes to take effect. See Applying property changes in the News repository for information about how to save and apply your changes.