# script for checking server and services are running or not

**URL:** <https://techcommunity.softwareag.com/t/script-for-checking-server-and-services-are-running-or-not/125448>\
**Category:** Feedback & ideas\
**Tags:** Discussions-on-this-Forum-System, New-User-Welcome-and-Introductions\
**Created:** [May 31, 2009, 5:37pm UTC](https://techcommunity.softwareag.com/t/script-for-checking-server-and-services-are-running-or-not/125448 "2009-05-31T17:37:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rush2mayank](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rush2mayank](https://techcommunity.softwareag.com/u/rush2mayank)\
**Post date:** [May 31, 2009, 5:37pm UTC](https://techcommunity.softwareag.com/t/script-for-checking-server-and-services-are-running-or-not/125448/1 "2009-05-31T17:37:07Z")

</div>

Hi guys,

I have a query.  
I have two production webMethods servers.I want to achieve load balancing. so what I am thinking is two bifurcate the load on both servers.  
But if one server crashes then I want to start all services on other server.

How can I write a script which will be scheduled to check whether the service or not . And if not running then automatically it will start that service in other server.  
How can I achieve the above mentioned.
