예: 스케줄러 테이블을 삭제하는 스크립트 사용
wsadmin 스크립트 도구를 사용하여 Jacl 스크립트를 호출하고 스케줄러 테이블을 제거합니다.
다음 Jacl 예 스크립트는 wsadmin 스크립트 도구를 사용하여 호출될 수 있으며, 구성된 스케줄러용 스케줄러 테이블을 제거합니다. 스케줄러가 작성되는 방법에 대한 세부사항은 “스케줄러 구성” 주제를 참조하십시오.
# Example JACL Script to drop the scheduler tables
# The name of the scheduler to drop the tables for
set schedName "My Scheduler"
puts ""
puts "Looking-up Scheduler Configuration Helper MBean"
puts ""
set schedHelper [$AdminControl queryNames WebSphere:*,type=WASSchedulerCfgHelper]
#Access the configuration object.
set myScheduler [$AdminConfig getid /SchedulerConfiguration:$schedName/]
if {$myScheduler == ""} {
puts ""
puts "Error: Scheduler with name: $schedName could not be found."
puts ""
exit
}
# Invoke the dropTables method on the helper MBean.
puts ""
puts "Dropping tables for:"
puts "$myScheduler"
puts ""
if {[catch {
set result [$AdminControl invoke $schedHelper dropTables $myScheduler]
if {$result} {
puts ""
puts "Successfully dropped the tables."
puts ""
} else {
puts ""
puts "The tables were already dropped."
puts ""
}
} errorInfo ] } {
puts ""
puts $errorInfo
puts ""
}
참조 주제