Clear all scheduled tasks
Overview
Use administrative commands to clear the scheduler of all tasks.
Clear scheduled tasks only if we must re-create all scheduler tasks. If we see LTPA token exceptions in the system log before each task runs, clear the scheduled tasks. An exception might occur, for example, after any of the following changes:
- A new LTPA token is imported into IBM Connections.
- A new LTPA token is imported from a server in another cell as the result of enabling single sign-on.
- Reverting the databases from a production environment to a staging environment.
- Generating new LTPA keys due to a corporate security policy or LTPA timeout.
Do not run the command documented here unless the applications are running. The administrative command used in this procedure interacts with scheduler MBeans commands. The WAS scheduler is not application-aware, so if the cluster that hosts an application is running, the scheduler attempts to run the scheduled tasks for that application, even if the application itself is stopped. Each attempt to run a scheduled task for a stopped application results in an error message to the log.
If we disable or stop an application, cancel any scheduled tasks associated with it.
Clear all scheduled tasks
- Access the Connections configuration files.
cd app_server_root/profiles/Dmgr01/bin
./wsadmin.sh -lang jython -user admin_user_id -password admin_password
execfile("connectionsConfig.py")
- To ensure that all clusters and applications are started and that no scheduled tasks are currently running, retrieve a list of tasks:
Scheduler.listAllTasks()
Determine what to do next...
Wsadmin client message Recommended action Status = running Wait until the task is completed. Skipping app_name application The cluster hosting the application is not running. Restart the cluster
When you list scheduled tasks, output like the following sample is displayed:
wsadmin>Scheduler.listAllTasks() Task Name | Status | Next Fire Time | Interval Communities tasks LifecycleRetryQueuedEvents SCHEDULED Mon Jun 24 09:01:00 EST 2013 0 1 0-23/3 ? * * EventLogCleanup SCHEDULED Mon Jun 24 09:30:00 EST 2013 0 30 0-23/3 ? * * Activities tasks TrashAutoPurgeJob SCHEDULED Sun Jun 23 02:00:00 EST 2013 0 0 2 ? * SUN ActivityAutoCompleteJob SCHEDULED Sat Jun 22 23:00:00 EST 2013 0 0 23 ? * SAT DatabaseRuntimeStats SCHEDULED Mon Jun 24 09:00:00 EST 2013 0 0 * * * ? 30MinStats SCHEDULED Mon Jun 24 09:00:00 EST 2013 0 0/30 * * * ? DailyStats SCHEDULED Mon Jun 24 11:00:00 EST 2013 0 0 11 * * ? Forums tasks TrashAutoPurgeJob SCHEDULED Sun Jun 23 02:00:00 EST 2013 0 0 2 ? * SUN Profiles tasks Profiles Worker Process SCHEDULED Mon Jun 24 08:36:46 EST 2013 20seconds Files tasks SearchClearDeletionHistory SCHEDULED Mon Jun 24 16:00:00 EST 2013 0 0 0,8,16 * * ? MetricsDailyCollection SCHEDULED Tue Jun 25 00:00:00 EST 2013 0 0 0 * * ? TagUpdateFrequency SCHEDULED Mon Jun 24 10:00:00 EST 2013 0 0 0-22/2 * * ? DirectoryGroupSynch SCHEDULED Mon Jun 24 09:00:00 EST 2013 0 0 * * * ? FileActuallyDelete SCHEDULED Mon Jun 24 09:00:00 EST 2013 0 0 0-23/3 * * ?| 0 30 1-23/3 * * ? Wikis tasks SearchClearDeletionHistory SCHEDULED Mon Jun 24 16:00:00 EST 2013 0 0 0,8,16 * * ? MetricsDailyCollection SCHEDULED Tue Jun 25 00:00:00 EST 2013 0 0 0 * * ? TagUpdateFrequency SCHEDULED Mon Jun 24 10:00:00 EST 2013 0 0 0-22/2 * * ? DirectoryGroupSynch SCHEDULED Mon Jun 24 09:00:00 EST 2013 0 0 * * * ? FileActuallyDelete SCHEDULED Mon Jun 24 09:00:00 EST 2013 0 0 0-23/3 * * ?| 0 30 1-23/3 * * ? News tasks NewsDataCleanup SCHEDULED Mon Jun 24 23:00:00 EST 2013 0 0 23 ? * * NewsCheckUpdatedPersons SCHEDULED Mon Jun 24 08:50:00 EST 2013 0 50 * * * ? EmailDigestDelivery SCHEDULED Mon Jun 24 09:00:00 EST 2013 0 0 * ? * * MetricsCollector SCHEDULED Tue Jun 25 02:00:00 EST 2013 0 0 2 ? * * PersonSpreadTranche SCHEDULED Tue Jul 02 22:00:00 EST 2013 0 0 22 1 * ? Search tasks 20min-file-retrieval-task SCHEDULED Mon Jun 24 08:41:00 EST 2013 0 1/20 0,2-23 * * ? 15min-search-indexing-task SCHEDULED Mon Jun 24 08:46:00 EST 2013 0 1/15 0,2-23 * * ? nightly-optimize-task SCHEDULED Tue Jun 25 01:30:00 EST 2013 0 30 1 * * ? nightly-sand-task SCHEDULED Tue Jun 25 01:00:00 EST 2013 0 0 1 * * ? wsadmin>
- To clear the scheduled tasks:
Scheduler.clearAllTasks()
If Scheduler.clearAllTasks() does not clear tasks successfully, run clearScheduler.sql manually for each of the applications.
For example:
IC50_Wizards/Connections/connections.sql/homepage/db2/clearScheduler.sql
IC50_Wizards/Connections/connections.sql/activities/db2/clearScheduler.sql
IC50_Wizards/Connections/connections.sql/blogs/db2/clearScheduler.sql
.
.Where IC50_Wizards is the location for the Connections 5.0 wizards.
- Restart the clusters to force the scheduled tasks to be re-created. From the WAS console...
Servers | Server Types | WebSphere application servers server | Restart
Parent topic:
Scheduling tasks