Automatically Restart a Service?

  • Thread starter Thread starter Curt
  • Start date Start date
C

Curt

Is there a good freeware app to have a Windows service periodically
restart, e.g., once a day at a specific time?
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Is there a good freeware app to have a Windows service periodically
restart, e.g., once a day at a specific time?

Put the following into a batch file:

@echo off
net stop servicename
net start servicename

And then at the command line (or using the Scheduled tasks Control Panel):

AT 09:00 /every:Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday <batch file leafname>

- --
Adam Piggott, Proprietor, Proactive Services (Computing).
http://www.proactiveservices.co.uk/

Please replace dot invalid with dot uk to email me.
Apply personally for PGP public key.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFDKIIm7uRVdtPsXDkRAk4MAJ4t4SWzfwlet1STQfpbL/o/ytugCACgj2Rk
koxQwJvP09H4hK8XIW7Cwec=
=98iG
-----END PGP SIGNATURE-----
 
You can get psservice.exe, part of pstools, from www.sysinternals.com and
use the task scheduler to run the appropriate command. It also works on
remote machines. Type "psservice /?" at a command prompt to see the options.
I have all of the pstools in my system32 folder so that I don't have to
specify the path to the executable.
Louis
 
Back
Top