Here is some sample output from a WLST session that shows me browsing to the JobSchedulerRuntimeMBean, finding an active task and cancelling it.
wls:/offline> connect('weblogic','weblogic','t3://localhost:7011')
Connecting to t3://localhost:7011 with userid weblogic ...
Successfully connected to managed Server 'managedServer1' that belongs to domain 'wldf_domain'.
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
wls:/wldf_domain/serverConfig> domainRuntime()
DomainRuntime MBeanServer is not enabled on a Managed Server.
wls:/wldf_domain/serverConfig> ls()
dr-- AdminConsole
dr-- AppDeployments
dr-- BridgeDestinations
dr-- Clusters
dr-- CustomResources
dr-- DeploymentConfiguration
dr-- Deployments
dr-- EmbeddedLDAP
dr-- ErrorHandlings
dr-- FileStores
dr-- InternalAppDeployments
dr-- InternalLibraries
dr-- JDBCDataSourceFactories
dr-- JDBCStores
dr-- JDBCSystemResources
dr-- JMSBridgeDestinations
dr-- JMSInteropModules
dr-- JMSServers
dr-- JMSSystemResources
dr-- JMX
dr-- JTA
dr-- JoltConnectionPools
dr-- Libraries
dr-- Log
dr-- LogFilters
dr-- Machines
dr-- MailSessions
dr-- MessagingBridges
dr-- MigratableTargets
dr-- RemoteSAFContexts
dr-- SAFAgents
dr-- SNMPAgent
dr-- SNMPAgentDeployments
dr-- Security
dr-- SecurityConfiguration
dr-- SelfTuning
dr-- Servers
dr-- ShutdownClasses
dr-- SingletonServices
dr-- StartupClasses
dr-- SystemResources
dr-- Targets
dr-- VirtualHosts
dr-- WLDFSystemResources
dr-- WLECConnectionPools
dr-- WSReliableDeliveryPolicies
dr-- WTCServers
dr-- WebAppContainer
dr-- WebserviceSecurities
dr-- XMLEntityCaches
dr-- XMLRegistries
-r-- AdminServerName AdminServer
-r-- AdministrationMBeanAuditingEnabled false
-r-- AdministrationPort 9002
-r-- AdministrationPortEnabled false
-r-- AdministrationProtocol t3s
-r-- ArchiveConfigurationCount 0
-r-- ClusterConstraintsEnabled false
-r-- ConfigBackupEnabled false
-r-- ConfigurationAuditType none
-r-- ConfigurationVersion 10.3.0.0
-r-- ConsoleContextPath console
-r-- ConsoleEnabled true
-r-- ConsoleExtensionDirectory console-ext
-r-- DomainVersion 10.3.0.0
-r-- GuardianEnabled false
-r-- InternalAppsDeployOnDemandEnabled true
-r-- LastModificationTime 0
-r-- Name wldf_domain
-r-- Notes null
-r-- Parent null
-r-- ProductionModeEnabled false
-r-- RootDirectory C:\Oracle\wls10gR3\user_projects\domains\wldf_domain
-r-- Type Domain
-r-x freezeCurrentValue Void : String(attributeName)
-r-x isSet Boolean : String(propertyName)
-r-x unSet Void : String(propertyName)
wls:/wldf_domain/serverConfig> serverRuntime()
wls:/wldf_domain/serverRuntime> ls()
dr-- ApplicationRuntimes
dr-- AsyncReplicationRuntime
dr-- ClusterRuntime
dr-- ConnectorServiceRuntime
dr-- DefaultExecuteQueueRuntime
dr-- EntityCacheCumulativeRuntime
dr-- EntityCacheCurrentStateRuntime
dr-- EntityCacheHistoricalRuntime
dr-- ExecuteQueueRuntimes
dr-- JDBCServiceRuntime
dr-- JMSRuntime
dr-- JTARuntime
dr-- JVMRuntime
dr-- JoltRuntime
dr-- LibraryRuntimes
dr-- LogBroadcasterRuntime
dr-- LogRuntime
dr-- MANAsyncReplicationRuntime
dr-- MANReplicationRuntime
dr-- MailSessionRuntimes
dr-- MaxThreadsConstraintRuntimes
dr-- MinThreadsConstraintRuntimes
dr-- PathServiceRuntime
dr-- PersistentStoreRuntimes
dr-- RequestClassRuntimes
dr-- SAFRuntime
dr-- SNMPAgentRuntime
dr-- ServerChannelRuntimes
dr-- ServerSecurityRuntime
dr-- ServerServices
dr-- SingleSignOnServicesRuntime
dr-- ThreadPoolRuntime
dr-- TimerRuntime
dr-- WANReplicationRuntime
dr-- WLDFRuntime
dr-- WTCRuntime
dr-- WebServerRuntimes
dr-- WorkManagerRuntimes
-r-- ActivationTime 1237559025844
-r-- AdminServer false
-r-- AdminServerHost 192.168.2.1
-r-- AdminServerListenPort 7001
-r-- AdminServerListenPortSecure false
-r-- AdministrationPort 9002
-r-- AdministrationPortEnabled false
-r-- AdministrationURL t3://192.168.2.1:7011
-r-- CurrentDirectory C:\Oracle\wls10gR3\user_projects\domains\wldf_domain\.
-r-- CurrentMachine
-r-- DefaultExecuteQueueRuntime null
-r-- DefaultURL t3://192.168.2.1:7011
-r-- EntityCacheCumulativeRuntime null
-r-- EntityCacheCurrentStateRuntime null
-r-- EntityCacheHistoricalRuntime null
-r-- HealthState Component:ServerRuntime,State:HEALTH_OK,MBean:managedServer1,ReasonCode:[]
-r-- JoltRuntime null
-r-- ListenAddress JBAYER-LAP/192.168.2.1
-r-- ListenPort 7011
-r-- ListenPortEnabled true
-r-- MANAsyncReplicationRuntime null
-r-- MANReplicationRuntime null
-r-- Name managedServer1
-r-- OpenSocketsCurrentCount 3
-r-- Parent null
-r-- PathServiceRuntime null
-r-- RestartRequired false
-r-- RestartsTotalCount 0
-r-- SSLListenAddress null
-r-- SSLListenPort 7002
-r-- SSLListenPortEnabled false
-r-- ServerClasspath C:\Oracle\wls10gR3\JROCKI~1\jre\bin\jrockit\jrockit1.6.0.jar;C:\Oracle\wls10gR3\JROCKI~1\jre\bin\jrockit\jmapi.jar;C:\Oracle\wls10gR3\JROCKI~1\
3\JROCKI~1\jre\bin\jrockit\rmp.jar;C:\Oracle\wls10gR3\JROCKI~1\jre\bin\jrockit\latency.jar;C:\Oracle\wls10gR3\JROCKI~1\jre\lib\resources.jar;C:\Oracle\wls10gR3\JROCKI~1\jre\lib\rt.jar;C:\Oracle\w
acle\wls10gR3\JROCKI~1\jre\lib\jsse.jar;C:\Oracle\wls10gR3\JROCKI~1\jre\lib\jce.jar;C:\Oracle\wls10gR3\JROCKI~1\jre\lib\charsets.jar;C:\Oracle\wls10gR3\JROCKI~1\jre\classes;C:\JDeveloper\mywork\J
ener.jar;C:\Oracle\wls10gR3\patch_wlw1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\wls10gR3\patch_wls1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:
ult\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\wls10gR3\patch_cie670\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\wls10gR3\patch_cie660\profiles\default\sys_manif
s10gR3\patch_alsb1030\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\wls10gR3\JROCKI~1\lib\tools.jar;C:\Oracle\wls10gR3\WLSERV~1.3\server\lib\weblogic_sp.jar;C:\Oracle\wls10
cle\wls10gR3\modules\features\weblogic.server.modules_10.3.0.0.jar;C:\Oracle\wls10gR3\WLSERV~1.3\server\lib\webservices.jar;C:\Oracle\wls10gR3\modules\ORGAPA~1.5/lib/ant-all.jar;C:\Oracle\wls10gR
\Oracle\wls10gR3\jdeveloper\modules\features\adf.share_11.1.1.jar;;C:\Oracle\wls10gR3\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;C:\Oracle\wls10gR3\WLSERV~1.3\server\lib\xqrl.jar;;;C:\Or
sysext_manifest_classpath\weblogic_ext_patch.jar
-r-- SocketsOpenedTotalCount 3
-r-- State RUNNING
-r-- StateVal 2
-r-- Type ServerRuntime
-r-- WANReplicationRuntime null
-r-- WLECConnectionServiceRuntime null
-r-- WeblogicVersion WebLogic Server Temporary Patch for CR380042 Thu Sep 11 13:33:40 PDT 2008
WebLogic Server Temporary Patch for 7372756 Fri Sep 12 17:05:44 EDT 2008
WebLogic Server Temporary Patch for CR380913 Wed Oct 15 13:24:22 PDT 2008
WebLogic Server Temporary Patch for CR381739 Tue Oct 21 14:06:14 IST 2008
WebLogic Server Temporary Patch for CR381056 Mon Oct 06 10:48:50 EDT 2008
WebLogic Server Temporary Patch for CR374413, CR378680 Tue Sep 02 09:55:36 PDT 2008
WebLogic Server Temporary Patch for CR378102 Wed Sep 10 23:28:48 PDT 2008
WebLogic Server Temporary Patch for CR378741 Tue Sep 09 13:08:51 PDT 2008
WebLogic Server Temporary Patch for CR378781, CR380313 Fri Sep 19 13:34:16 PDT 2008
WebLogic Server 10.3 Fri Jul 25 16:30:05 EDT 2008 1137967
-r-x addRequestClassRuntime Boolean : WebLogicMBean(weblogic.management.runtime.RequestClassRuntimeMBean)
-r-x forceShutdown Void :
-r-x forceSuspend Void :
-r-x getServerChannel java.net.InetSocketAddress : String(protocol)
-r-x getURL String : String(protocol)
-r-x preDeregister Void :
-r-x restartSSLChannels Void :
-r-x resume Void :
-r-x shutdown Void :
-r-x shutdown Void : Integer(timeout),Boolean(ignoreSessions)
-r-x start Void :
-r-x suspend Void :
-r-x suspend Void : Integer(timeout),Boolean(ignoreSessions)
wls:/wldf_domain/serverRuntime> cd('ClusterRuntime')
wls:/wldf_domain/serverRuntime/ClusterRuntime> ls()
dr-- myCluster
wls:/wldf_domain/serverRuntime/ClusterRuntime> cd('myCluster')
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster> ls()
dr-- JobSchedulerRuntime
dr-- ServerMigrationRuntime
dr-- UnicastMessaging
-r-- ActiveSingletonServices java.lang.String[TimerMaster]
-r-- AliveServerCount 1
-r-- CurrentMachine null
-r-- CurrentSecondaryServer
-r-- DetailedSecondariesDistribution null
-r-- ForeignFragmentsDroppedCount 0
-r-- FragmentsReceivedCount 581
-r-- FragmentsSentCount 581
-r-- HealthState Component:null,State:HEALTH_OK,MBean:null,ReasonCode:[]
-r-- MulticastMessagesLostCount 0
-r-- Name myCluster
-r-- PrimaryCount 0
-r-- ResendRequestsCount 0
-r-- SecondaryCount 0
-r-- SecondaryDistributionNames null
-r-- SecondaryServerDetails
-r-- ServerNames java.lang.String[managedServer1]
-r-- Type ClusterRuntime
-r-- UnicastMessaging null
-r-x preDeregister Void :
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster> cd('JobSchedulerRuntime')
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster/JobSchedulerRuntime> ls()
dr-- JobSchedulerRuntime
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster/JobSchedulerRuntime> cd('JobSchedulerRuntime')
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster/JobSchedulerRuntime/JobSchedulerRuntime> ls()
dr-- ExecutedJobs
-r-- Name JobSchedulerRuntime
-r-- Type JobSchedulerRuntime
-r-x getJob WebLogicMBean : String(id)
-r-x preDeregister Void :
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster/JobSchedulerRuntime/JobSchedulerRuntime> cd('ExecutedJobs')
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster/JobSchedulerRuntime/JobSchedulerRuntime/ExecutedJobs> ls()
dr-- JobRuntime-managedServer1_1237564053328
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster/JobSchedulerRuntime/JobSchedulerRuntime/ExecutedJobs> cd('JobRuntime-managedServer1_1237564053328')
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster/JobSchedulerRuntime/JobSchedulerRuntime/ExecutedJobs/JobRuntime-managedServer1_1237564053328> ls()
-r-- Description jamesbayer.client.SystemOutTimerListener@2ed941
-r-- ID managedServer1_1237564053328
-r-- LastLocalExecutionTime 1237564580328
-r-- LocalExecutionCount 18
-r-- Name JobRuntime-managedServer1_1237564053328
-r-- Period 30000
-r-- State Running
-r-- Timeout 6719
-r-- TimerListener jamesbayer.client.SystemOutTimerListener@333c5d
-r-- Type JobRuntime
-r-x cancel Void :
-r-x preDeregister Void :
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster/JobSchedulerRuntime/JobSchedulerRuntime/ExecutedJobs/JobRuntime-managedServer1_1237564053328> ls()
-r-- Description jamesbayer.client.SystemOutTimerListener@2ed941
-r-- ID managedServer1_1237564053328
-r-- LastLocalExecutionTime 1237564850547
-r-- LocalExecutionCount 27
-r-- Name JobRuntime-managedServer1_1237564053328
-r-- Period 30000
-r-- State Running
-r-- Timeout 18812
-r-- TimerListener jamesbayer.client.SystemOutTimerListener@349b7f
-r-- Type JobRuntime
-r-x cancel Void :
-r-x preDeregister Void :
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster/JobSchedulerRuntime/JobSchedulerRuntime/ExecutedJobs/JobRuntime-managedServer1_1237564053328> cmo.cancel()
wls:/wldf_domain/serverRuntime/ClusterRuntime/myCluster/JobSchedulerRuntime/JobSchedulerRuntime/ExecutedJobs/JobRuntime-managedServer1_1237564053328> ls()
-r-- Description jamesbayer.client.SystemOutTimerListener@2ed941
-r-- ID managedServer1_1237564053328
-r-- LastLocalExecutionTime 1237564850547
-r-- LocalExecutionCount 27
-r-- Name JobRuntime-managedServer1_1237564053328
-r-- Period 30000
-r-- State Cancelled
-r-- Timeout -1
-r-- TimerListener null
-r-- Type JobRuntime
-r-x cancel Void :
-r-x preDeregister Void :
One of my customers asked me about how they could periodically check if a task was running in the cluster, and if it is not then send someone an email, etc. Basically, the sky is the limit with scripting. A more advanced use of this would be to connect this to alerts in WebLogic Diagnsotic Framework or SNMP traps in Oracle Enterprise Manager, but this is a start. Here is a python script that you can invoke with WLST that will do several things: