Question : Script to stop and stat websphere on windows

Hi Experts- I would like to restart  our websphere on windows box every night. Could you please provide the best approach to schedule  and the script to Stop and start code.

Answer : Script to stop and stat websphere on windows

If you have a stand-alone AppServer, then you don't have node agents and a domain manager.  These kinds of application servers only exist in a Network Deployment configuration which is most normally used in an environment where you have to deal with, or plan for failover, and large volumes of client requests.

The kind of issue that you describe is likely to be associated with the way you have written your application.  So, it is unlikely that you would need to restart the domain manager, or node agent even if you had them.

With what kinds of scripting languages are you familiar / comfortable?

I would suggest that you learn / use Python.
You would get a lot of benefit from this because should you need to write scripts to manipulate, or work directly with your WebSphere Application Server, then it would be best if you could use Jython, which is an implementation of Python that executes on a JVM.

The WebSphere Application Server administration utility (wsadmin) supports Jacl, and Jython as scripting languages.  I find Jython much easier to read, and use.

Consider using Active Python from ActiveState (http://www.activestate.com/python). It includes all sorts of library modules, as well as very thorough, and easy to use help/documentation.

Here is an example Python script that I use (all the time) to check the status of my AppServers...

It is called wasStatus.py, and can be executed like this,

python wasStatus.py C:\IBM\WebSphere\AppServer

And the output for it (on my specific ND environment) looks like this:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
C:\Utilities>python wasStatus.py C:\IBM\WebSphere\AppServer
AppSrv00
  stopped: server1
AppSrv01
  stopped: nodeagent
  stopped: server1
AppSrv02
  stopped: nodeagent
  stopped: server1
Dmgr01
  stopped: dmgr
 
wasStatus.py
 
Random Solutions  
 
programming4us programming4us