Solved

Restart a Generic Service in Windows 2003 Server

Posted on 2009-07-06
5
705 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
ID: 24786521
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 83

Accepted Solution

by:
oBdA earned 250 total points
ID: 24786536
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
ID: 24789525
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 83

Expert Comment

by:oBdA
ID: 24789683
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
ID: 24821405
This has worked successfully thankyou
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 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