How to configure Windows Service to restart automatically

Windows Service is a program or application that runs on the Windows operating system and operates as a background process, without requiring user interaction.

A service is, in fact, any Windows program that uses the Service API to perform low-level activities that require little or no user input.

Windows Service controls various operations, such as network connection, speaker sound, data backup, and user authentication. Services are typically used for continuous system tasks, such as monitoring, synchronization, or other maintenance tasks.

Windows Service can be set to auto-start when the computer boots and runs all the time even if no user is logged on to the system.

You may need to open and adjust your Windows Service from time to time. Start or stop a Service, disable it, delay its startup, or restart or suspend a Windows Service.

How to open Windows Services Manager

There are several ways to open Windows Services Manager:

  1. Use the keyboard keys (WIN + R) and type “services.msc” in the Run dialog box. Press Enter.
  2. Click Start Menu, then find and click Control Panel. Click System and Security, then click Administrative Tools. Double-click on Services.
  3. Click the Start Menu, then find and click Command Prompt (Admin). Type “services.msc” in the Command Prompt and press Enter.

All the above methods will open the Windows Services Manager, which will allow you to set up and manage the services running on the Windows operating system.

How to restart Windows Services

To restart Windows Service, you can use Windows Services Manager. Here are the steps to restart a specific Service:

  1. Open Windows Services Manager.
  2. Find the service you want to restart, for example, “Print Spooler”.
  3. Right-click on the service and select ” Restart ” from the drop-down menu.
  4. A confirmation pop-up will appear, click ” Yes ” to continue.
  5. The service will restart and will run as normal.

Some services may require a computer restart to restart the service. If the service cannot be restarted via Windows Services Manager, restart your computer.

How to configure Windows Service to restart automatically if it crashes

To configure Windows Service to automatically restart if it crashes, here are the steps you can take:

autorestart windows service
  1. Open ” Services ” via Control Panel or by entering the command “services.msc” in Run.
  2. Find the service you want to configure and right-click on it.
  3. Select the “Recovery” tab.
  4. In the ” First failure ” section, select the “Restart the Service” option.
  5. In the “Subsequent failures” section, select the ” Restart the Service ” option as well.
  6. Click OK to save changes.

Service will automatically restart after the crash. You can change recovery settings for each different type of service failure.

How to configure Windows Service to restart automatically via the Task Scheduler

To configure Windows Service to restart automatically via Task Scheduler, follow these steps:

  1. Open Task Scheduler: Click Start, find Task Scheduler, and click on Task Scheduler.
  2. Create a new task: Click on the ” Create Task...” button in the ” Actions ” section.
  3. Name the task: Enter a name for the task in the ” Name ” box.
  4. Trigger configuration: Click on the “ Triggers ” tab and click on the “ New ” button. Select ” At log on ” or ” At startup ” or other desired time.
  5. Then set ” Repeat task every “, for example, every hour, if you want to check the service every hour.
task scheduler repeat task
  1. Action configuration: Click on the “Actions ” tab and click on the ” New ” button. Select ” Start a program ” and enter the commandnet start [service_name]” in the “Program/script” box.
task scheduler actions
  1. Save task: Click the “OK” button to save the task and start the task automatically each time the computer is turned on.
  2. Check task: Open Task Scheduler and check if the new task is running correctly.

Note that service_name must be replaced with the name of the service you want to configure.

RELATED ARTICLES

Latest Articles