Installing the Scheduler Windows service

Enterprise license required

Features described on this page require the Kentico Xperience Enterprise license.

Xperience provides a dedicated Windows service for executing scheduled tasks. You can use the service to execute tasks externally outside of the live site or Xperience administration application (typically for resource-consuming tasks).

Installing the Scheduler Windows service using Kentico Service Manager

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

  1. Launch the Kentico Xperience Service Manager utility from the Kentico program files group in the Windows Start menu.
  2. Choose the Xperience instance where you want to install the service (select the CMS folder).
  3. Select the Kentico Scheduler service.
  4. Click Install.
    Installing the Xperience 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.

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 Xperience 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:.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 Xperience 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 Xperience 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 as account of individual services to a different account with database access.

Configuring file permissions for search indexing

If you plan to run scheduled tasks that perform updates on the file system of your live site or administration application, you need to give Write permissions for the given folder to the account used by the Windows scheduler service (Network Service by default). For example, if using locally stored search indexes together with the Execute local search tasks scheduled task.

You can configure the account for services via the Log on as property in the Windows Services management console.

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 Xperience instance specified by the /webpath parameter is uninstalled.