To stop the WebLogic domain with WebLogic Scripting:
Note: You must indent the commands under "try" and "except".
print('PRM-Stopping Primavera administration server, managed servers, and deployments')
print('PRM-This will NOT attempt to stop the node manager as it may be')
print('PRM-needed for other servers on this machine.')
connect(userConfigFile= '
p6home/scripts/primaveraConfig.secure',userKeyFile='
p6home/scripts/primaveraKeyfile.secure',url='t3://
Adminserverhost:
Adminserverport')
try:
print('PRM-Shutting down managed server
myManagedServer')
shutdown('
myManagedServer','Server','true',100,'true')
except:
print('PRM-Failed to stop managed server
myManagedServer')
try:
print('PRM-Shutting down
AdminServer')
shutdown('
AdminServer','Server','true',100,'true')
except:
print('PRM-Failed to stop
AdminServer')
print('PRM-Shutdown Complete')
exit()
where:
Note: You must indent the commands under "try" and "except".
try:
print('PRM-Shutting down managed server
myManagedServer')
shutdown('
myManagedServer','Server','true',100,'true')
except:
print('PRM-Failed to stop managed server
myManagedServer')
<P6_EPPM_Home>\scripts
and then create a text file called stop_primavera.bat.
SETLOCAL
SET CLASSPATH=
call weblogic_home\user_projects\domains\your_domain\bin\setDomainEnv.cmd
call java_home\bin\java.exe weblogic.WLST p6home\scripts\stop_primavera.py
where:
Note: If the "java_home", "p6home" or "weblogic_home" directories contain a space in the path, it should include quotations around the full path and executable/command file being called. For example: call "C:\Program Files\Java\jdk1.6.0_27\bin\java.exe" weblogic.WLST C:\P6WebAccess\scripts\start_primavera.py
Using the WebLogic Scripting Tool on Windows
Starting the Node Manager with WebLogic
Starting an Administration and Managed Servers Using WLST With Node Manager
Adding the start_primavera.bat to the Windows Task Scheduler
Executing the start_primavera.bat file
Legal Notices
Copyright © 2016,
Oracle and/or its affiliates. All rights reserved.
Last Published Monday, October 24, 2016