Managing scheduled tasks for the News repository
Use administrative commands to manage scheduled tasks for the News repository.
Before you begin
To run administrative commands, you must use the wsadmin client. See Starting the wsadmin client for details.
About this task
SystemOut.log also contains information about whether the scheduler is running and whether any scheduled tasks have started. Log messages for the news service have the prefix CLFWX in SystemOut.log. For more information, see HCL Connections log file.
The News repository uses the IBM® WebSphere® Application Server scheduling service for performing regular managed tasks. For more information about how the scheduler works, see Scheduling tasks.
Procedure
- Start the wsadmin client from the following
directory of the system on which you installed the Deployment Manager:
where app_server_root is the WebSphere® Application Server installation directory and dm_profile_root is the Deployment Manager profile directory, typically dmgr01.app_server_root\profiles\dm_profile_root\bin
You must start the client from this directory or subsequent commands that you enter do not execute correctly.
- Start the Jython script interpreter for the News repository.
- Use the following commands to administer the scheduler
service for the News repository.
- NewsScheduler.getTaskDetails(java.lang.String taskName)
Returns information about the scheduled task specified by taskName.
The values returned are server time, next scheduled run time, status (SCHEDULED, RUNNING, SUSPENDED), and task name. When the task has been paused, then the status parameter shows as SUSPENDED instead of SCHEDULED. SUSPENDED means that the task is not scheduled to run.
For example:
The resulting output looks similar to the following:NewsScheduler.getTaskDetails("NewsDataCleanup")
{taskName=NewsDataCleanup, currentServerTime=Fri Mar 12 14:42:25 GMT 2010, nextFireTime=Fri Mar 12 23:00:00 GMT 2010, status=SCHEDULED}
- NewsScheduler.pauseSchedulingTask(java.lang.String taskName)
Temporarily pauses the specified task and stops it from running.
When you pause a scheduled task, the task remains in the suspended state even after you stop and restart News or the WebSphere® Application Server. You must run the NewsScheduler.resumeSchedulingTask(String taskName) command to get the task running again.
If the task is currently running, it continues to run but is not scheduled to run again. If the task is already suspended, this command has no effect. When the task is paused successfully, a 1 is returned to the wsadmin client. When the task is not paused successfully, a 0 is returned.
For example:NewsScheduler.pauseSchedulingTask("NewsDataCleanup")
- NewsScheduler.resumeSchedulingTask(java.lang.String taskName)
If the task is suspended, puts the task in the scheduled state. If the task is not suspended, this command has no effect.
When a task is resumed, it does not run immediately; it runs at the time when it is next scheduled to run.
For example:
When the task is resumed successfully, a 1 is returned to the wsadmin client. When the task is not resumed successfully, a 0 is returned.NewsScheduler.resumeSchedulingTask("NewsDataCleanup")