Configure the community trash settings: delete trash schedule,
community delete trash interval and enable or disable the delete trash
task.
About this task
Communities in the trash area are purged after 90 days by default. Also, the task to delete
community trash is scheduled to run at 3AM daily. You can change both these configuration
settings by modifying configuration settings in
communities-config.xml. A community stop/start is required for any
changes to take effect.
Procedure
To configure community trash settings, you must update
the scheduledTasks
section in communities-config.xml.
- Start the wsadmin client from the following
directory of the system on which you installed the Deployment Manager:
app_server_root\profiles\dm_profile_root\bin
where
app_server_root 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 Communities Jython script interpreter.
- Use the following command
to access the Communities configuration files:
execfile("communitiesAdmin.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,
you must pick the node where the file is stored.
- Check out the Communities
configuration files using the following command:
CommunitiesConfigService.checkOutConfig("working_directory",
"cell_name")
where:
For example:
CommunitiesConfigService.checkOutConfig("/opt/my_temp_dir", "CommServerNode01Cell")
- Browse to the working directory that you specified in the
previous step and open the communities-config.xml file
using a text editor.
- Browse to the
scheduledTasks
section:
<comm:scheduledTasks>
...
<comm:task name="fullDelete" description="Fully delete Communities in trash"
interval="0 0 3 ? * *" startby=""
enabled="true" scope="cluster" type="internal"
targetName="" mbeanMethodName="" serverName="unsupported" />
...
<!-- Number of days after which a soft-deleted community will be fully deleted -->
<comm:daysToDelete>90</comm:daysToDelete>
-
The fullDeletetask to delete community trash is scheduled to run
at 3am daily by default. To configure when the task runs change the
interval
property. For example, set interval="0 0 8 ? *
*"
to run the task at 8am daily.
- To prevent communities from being deleted from trash, disable
the task by changing
enabled=true
to enabled=false
.
-
Communities in the trash area are purged after 90 days by default. To change number
of days after which a community in trash is fully deleted, change the
<comm:daysToDelete>
property.
Note: If you set <comm:daysToDelete>0</comm:daysToDelete>
, communities are
not deleted immediately and remain in the trash for at least one day. This is because the background
task purges any communities in trash older than comm:daysToDelete
days. At least 24
hours has to pass for a Community to be in the trash for one day (which is > 0) days.
- 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 Communities for information about how to
save and apply your changes.
-
Stop and restart Communities so that changes to configuration files take effect. For more
information, see Starting or stopping Connections applications.
What to do next
An entry is logged to SystemOut.log
when the task runs. Check log entries
to see when tasks start, how many communities were deleted, and when the next run will take
place. [9/11/13 3:00:00:867 EDT] 0000006a NotificationS I CLFWY0297I:
The task fullDelete for Communities has begun execution
...
[9/11/13 3:10:53:170 EDT] 0000006a FullDeleteTas I
com.ibm.lconn.comm.internal.service.FullDeleteTask$1 run CLFRM0261I: Fully deleted 13
communities that were soft-deleted more than 90 days ago.
[9/11/13 3:10:53:173 EDT] 0000006a NotificationS I CLFWY0337I: The next run time
for the task fullDelete for Communities is at 03:00:00.