Enable scheduled tasks
Use SearchService administrative commands to enable and disable the scheduled tasks defined in the Home page database.
To enable or disable scheduled tasks in the Home page database.
- Initialize the Search environment, and start the Search script interpreter:
cd app_server_root/profiles/Dmgr01/bin
./wsadmin.sh -lang jython
execfile("searchAdmin.py")If successful...
Search Administration initialized
- Disable and re-enable scheduled tasks.
- SearchService.disableAllTasks()
- Disable all scheduled tasks for the Search application. This command does not take any arguments.
When the command runs successfully, 1 is printed to the wsadmin console. If the command does not run successfully, 0 is printed to the wsadmin console.
- SearchService.disableTask(String taskName)
- Disable the scheduled task with the specified name. This command takes a single argument:
- taskName
The name of the task to be disabled.
For example:
SearchService.disableTask("mine")
When the command runs successfully, 1 is printed to the wsadmin console. If the command does not run successfully, 0 is printed to the wsadmin console.
Use this command affects the indexing process :
- When the command is run before the scheduled task fires, the indexing operation is prevented from starting.
- When the command is run during the indexing operation for an application, the Search application stops indexing.
Results for the current application that is being indexed are discarded but, if, as part of an scheduled task, some applications have been successfully crawled, those applications are up-to-date in the index. For example, if a task is fired that is to index Bookmarks, Blogs, and Activities (in that order) and the disable command is called while Blogs is being indexed, when the task is enabled again, Blogs and Activities resume indexing at the same point as the previously-called task. Disabled tasks remain disabled until they are re-enabled.
- SearchService.enableAllTasks()
- Renable all scheduled tasks for the Search application. This command does not take any arguments.
When the command runs successfully, 1 is printed to the wsadmin console. If the command does not run successfully, 0 is printed to the wsadmin console.
- SearchService.enableTask(String taskName)
- Renable the scheduled task with the specified name. This command uses the current schedule. This command takes a single argument:
- taskName
The name of the task to be enabled.
For example:
SearchService.enableTask("mine")
When the command runs successfully, 1 is printed to the wsadmin console. If the command does not run successfully, 0 is printed to the wsadmin console.
- Save your work
AdminConfig.save()
exit
Parent topic:
Configure scheduled tasks
Related:
Scheduling tasks
Add scheduled tasks for Search
Back up the Search index manually
Search error messages