Solved

Restart a Generic Service in Windows 2003 Server

Posted on 2009-07-06
5
702 Views
Last Modified: 2012-05-07
Hi Experts,

Please can you assist in the scenario below?

We have a windows 2003 clustered server (2 nodes)

The cluster has a resource setup as a generic service.

We require the service to be restarted on a daily schedule.. can you advise the best way? With it being a clustered resource, does it make more difficult.

A scheduled task with a srcipt would be ideal.
Thankyou,




0
Comment
Question by:wk6838
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:marcustech
Comment Utility
create a .bat file in note pad with

net stop "service name"
net start "service name"
(keep the speach marks " - and replace service name with the exact name of the service)

in schedualled tasks, set it to run at required time.

enoy
0
 
LVL 82

Accepted Solution

by:
oBdA earned 250 total points
Comment Utility
This is a cluster; do NOT use "net stop" or "net start"!
You need to use cluster.exe to take the resource offline and then back online again:
REM stop the service:
cluster /cluster:<Clustername> res "<Some Generic Service>" /offline
REM start the service:
cluster /cluster:<Clustername> res "<Some Generic Service>" /online
0
 

Author Comment

by:wk6838
Comment Utility
thanks for the comments. Yes it is a cluster.
oBdA > If I put the command in the script will it also bring down the dependancies?
0
 
LVL 82

Expert Comment

by:oBdA
Comment Utility
It will take down all resources that are dependent on the service (but not resources that the service depends on).
If you have other resources that are dependent on this service, and you want to bring them all online after stopping the service, simply bring the whole group online:
cluster /cluster:<Clustername> group "<Some Resource group Name>" /online
0
 

Author Comment

by:wk6838
Comment Utility
This has worked successfully thankyou
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now