For increased stability, you may wish to restart Windows Services on a regular basis. This allows to recycle processes and memory threads to keep a healthy system running.
To recycle Windows Services you can simply create a Scheduled Task using two actions with the NET commands. The first one to stop the service, the second one to start the service.
- Open the Windows Services Management Console by typing services.msc in the run box.
- Locate the GSX Monitor service and open its properties.
- Take note of the Service name for future use:
- Open the Task Scheduler by typing Task in the Windows search box:
- Select Create a Basic Task from the Actions list on the right:
- Name the task Stop GSX Monitor:
- Click Next and select Daily Trigger:
- Pick a time where there will be no activity such as 3:00 AM:
- Click Next and for the Action select Start a program:
- For the Program/Script type NET and add the arguments Stop "GSX Monitor" or service name noted earlier (step #3) if different:
- Before Finishing, select the Open the Properties dialog option:
- In the General tab select Run whether user is logged in or not and Run with highest privileges:
This task will stop the GSX Monitor service, daily at a chosen time, now we need to create another task to launch it again.
We will start GSX Monitor 5 minutes later to give the Windows Service some time to close all pending tasks before restarting.
- Select Create a Basic Task from the Actions list on the right.
- Name the task as Start GSX Monitor Service:
- Set the Trigger to start Daily at 5 minutes after the stop time set previously:
- Click Next and for the Action select Start a program.
- For the Program/Script type NET and add the arguments Start "GSX Monitor" or service name noted earlier (step #3) if different:
- Before Finishing, select the Open the Properties dialog option as before.
- In the General tab, select Run whether user is logged in or not and Run with highest privileges.
You have now created two scheduled tasks, one will stop the GSX Monitor service and the other will start it again 5 minutes later.
NET START can be used to start Windows services. NET STOP can be used to stop Windows services.
When typed at the command prompt, service names of two words or more must be enclosed in quotation marks. For example, NET START "GSX Monitor" starts the GSX Monitor service.You can use this technique with any Windows Service responding to the NET command.