Monday, December 10, 2012

How to time windows services using "Scheduled Tasks"

In short, you need to use the program "sc" to communicate with the services. So in a "Scheduled Task" you would put the run command as:
C:\WINDOWS\system32\cmd.exe /c sc start tomcat7
To start tomcat and of course:
C:\WINDOWS\system32\cmd.exe /c sc stop tomcat7
To stop tomcat. Fin.

Haiya ala Solah