When creating a windows server that is going to run application and process servers for PeopleSoft I find a great way to automate the starting and stopping of services. PeopleSoft delivers a method of installing a service to stop/start the services, which I have seen many people use, but I personally think it is a little buggy. I have experienced weird issues with the services not stopping properly, or if you have multiples and one has a problem you either effect all of them or you have to manually go to psadmin to administer the problem domain. I have also found that having non-administers trying to use the service/psadmin to be tricky.
As a solution to this problem, I have always liked using Windows Scheduled Tasks. Scheduled tasks can be setup in advanced and you can run either a batch program (script) or the psadmin.exe utility. When you scheduled a task you also set what user it will run as regardless of who runs it thus allowing a developer to run the script without being the administrator.
The only problem I have had with this is with the introduction of ps_cfg_home and ps_app_home variables. Typically these can vary for every environment in which case I will create a batch program that sets the variables and then call psadmin in the script. Then I schedule the task to run the batch program. In order to run psadmin correctly after 8.50 you have to make sure the ps_cfg_home is set before running psadmin, otherwise it won’t know where the domains are.
For example on my environment I have an environment variable for the ps_cfg_home=c:\oracle\psoft\pt852cfg and my scheduled task is setup to run c:\oracle\psoft\pt852\appserv\psadmin.exe -p stop -d HRDEMO. This basically tells the system where the HRDEMO domain is stored and to stop the process scheduler.
Other commands:
Application Server Start: psadmin.exe -c boot -d {Domain}
Application Server Stop: psadmin.exe -c shutdown -d {Domain} (to “force” down use shutdown! <-note exclamation point)
Process Server Start: psadmin.exe -p start -d {Domain}
Process Server Stop: psadmin.exe -p stop -d {Domain}