+

Search Tips   |   Advanced Search

Manage Communities scheduled tasks


Overview

Use the CommunitiesScheduler commands to administer the community event tasks performed by the IBM WebSphere Application Server scheduler. These administrative commands do not require a server restart to take effect, and no file checkout is necessary.

To use administrative commands, use wsadmin.sh.

Communities uses the WAS scheduler to run the following scheduled tasks relating to community events and cleaning up data. For more information about the scheduler, see Scheduling tasks.

LifecycleRetryQueuedEvents Automatically retry sending life-cycle events to other applications when event processing fails, for example, when another application server is down.
EventLogCleanup Remove old entries from the event log.
GroupCleanup Remove cached LDAP group information from the Communities database for groups that are no longer used in community membership.
fullDelete Remove deleted communities from the trash. The number of days that a community stays in the trash before being removed is configurable.

We can use the CommunitiesScheduler commands to retrieve details about these tasks, and manually pause and resume the tasks as needed.


Administer the tasks performed by the WAS scheduler

  1. Start the Communities Jython script interpreter

      cd app_server_root/profiles/Dmgr01/bin
      ./wsadmin.sh -lang jython
      execfile("communitiesAdmin.py")

  2. Administer the Communities scheduler service:

    CommunitiesScheduler.getTaskDetails(String taskName) Return information about the scheduled task specified by taskName. The task names are LifecycleRetryQueuedEvents and EventLogCleanup. The values returned in the HashMap are the next scheduled fire time, server time, status (SCHEDULED, RUNNING, SUSPENDED), and task name. SUSPENDED means the task is not scheduled to run. For example:

      CommunitiesScheduler.getTaskDetails("LifecycleRetryQueuedEvents")

    CommunitiesScheduler.pauseSchedulingTask(String taskName) Puts the task in the suspended state. When you pause a scheduled task, that task remains in the suspended state even after you stop and restart Communities or the WAS. The task names are LifecycleRetryQueuedEvents and EventLogCleanup. Run the CommunitiesScheduler.resumeSchedulingTask command to get the scheduled task running again. If the task is currently running when we use this command, the task continues to run but is not scheduled to run again. If the task is already suspended, this command has no effect. The return value is either 1 or 0. 1 indicates success; 0 indicates failure. For example:

      CommunitiesScheduler.pauseSchedulingTask("LifecycleRetryQueuedEvents")

    CommunitiesScheduler.resumeSchedulingTask(String taskName) If the task is suspended, puts the task in the scheduled stated. If the task is not suspended, this command has no effect. The task names are LifecycleRetryQueuedEvents and EventLogCleanup. The return value is either 1 or 0. 1 indicates success; 0 indicates failure. For example:

      CommunitiesScheduler.resumeSchedulingTask("LifecycleRetryQueuedEvents")


Parent topic:
Administer Communities


Related:
Administer widgets and remote applications
Scheduling tasks
Work with Community trash
Administer community queued events
Configure news event log clean-up