Installing the Scheduler Windows service

Kentico provides a dedicated Windows service for executing scheduled tasks. You can use the service to execute tasks externally instead of the application itself (typically for resource-consuming tasks). Executing scheduled tasks using the Windows service can optimize the performance of your application.

Installing the Scheduler Windows service using Kentico Service Manager

The easiest way to install the Scheduler Windows service is to use the Kentico Service Manager utility:

  1. Launch the Kentico Service Manager utility from the Kentico program files group in the Windows Start menu.
  2. Choose the Kentico instance where you want to install the service (select the CMS folder).
  3. Select the Kentico Scheduler service.
  4. Click Install.

    Installing the Kentico scheduler service

  5. Click Start to start the service after it is installed.

You have installed the Kentico Scheduler service, which is now running and ready to be used.

You can uninstall the service at any time by clicking Uninstall in the Kentico Service Manager utility.

On this page

Kentico EMS required

Features described on this page require the Kentico EMS license.

Installing the Scheduler Windows service from the command line

To install the Windows service from the command line, you need to use Installer Tool (InstallUtil.exe), which is a native part of the .NET Framework:

  1. Open the Windows command line (type cmd in the Start menu search box)
  2. Navigate to the .NET folder containing InstallUtil.exe (e.g. c:\Windows\Microsoft.NET\Framework64\v4.0.30319\).
  3. Execute InstallUtil.exe from the Windows command line with the following parameters:

    InstallUtil.exe /webpath="C:\inetpub\wwwroot\Kentico\CMS" "c:\inetpub\wwwroot\Kentico\CMS\bin\SchedulerService.exe" /LogToConsole=true /i

    The following table describes the used parameters:

    /webpath Path to the CMS folder of the Kentico instance for which you want to install the service.
    second parameter Path to the SchedulerService.exe file in the Bin folder inside the application (typically c:\inetpub\wwwroot\Kentico\CMS\bin\SchedulerService.exe).
    /LogToConsole Optional parameter that determines whether the installation progress is logged to the console.
    /i If this parameter is used, the Installer Tool performs installation of the Windows service.
  4. Open the Services management console (type services.msc into the Start menu search box).
  5. Select the Kentico Scheduler (<CMSApplicationName web.config key value>) service in the list.
  6. Click the Start Service button on the top toolbar.

Configuring database permissions for services

By default, Kentico services run under the Local System (NT AUTHORITY\System) account. If you experience problems with services not starting, the Local System account may not have sufficient permissions for your Kentico database.

Either grant sufficient permissions for the NT AUTHORITY\SYSTEM login in your database (at least assign a schema with the Connect permission), or use the Windows Services management console to change the Log On account of individual services to a different account with database access.

Uninstalling the Scheduler Windows service from the command line

  1. Open the Windows command line (type cmd in the Start menu search box).
  2. Navigate to the .NET folder containing InstallUtil.exe (e.g. c:\Windows\Microsoft.NET\Framework64\v4.0.30319\).

  3. Execute InstallUtil.exe from the Windows command line with the following parameters:

    InstallUtil /webpath="C:\inetpub\wwwroot\Kentico\CMS" "c:\inetpub\wwwroot\Kentico\CMS\bin\SchedulerService.exe" /LogToConsole=true /u

After executing this command, the Scheduler Windows service for the Kentico instance specified by the /webpath parameter is uninstalled.


Was this page helpful?