Kentico CMS 6.0 Developer's Guide

Installing the Scheduler Windows service

Installing the Scheduler Windows service

Previous topic Next topic Mail us feedback on this topic!  

Installing the Scheduler Windows service

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

Kentico CMS comes with a dedicated Windows service for execution of scheduled tasks. This service can be used to execute specified tasks — typically the resource-consuming ones — instead of the application itself in order to optimize application performance.


The following text describes how the service can be installed. Please note that a specific configuration is also required for scheduled tasks to be executed by the Windows service. See Configuring task execution for more details.


Installing and uninstalling the Scheduler Windows service using Kentico CMS Service Manager


The easiest way to install or uninstall the Scheduler Windows service is to use the Kentico Service Manager utility. The utility can either be launched from Kentico CMS program group in Windows Start menu, or from Kentico Installation Manager, as shown in the screenshot below.




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. The following steps describe installation of the Windows service using the Installer Tool.


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


2. Execute InstallUtil.exe from Windows command line with parameters as shown below. The parameters mean the following:


/webpath - path to the root folder of the Kentico CMS instance for that you want to install the Windows service.

second parameter - path to the SchedulerService.exe file in the Bin folder inside application root (typically c:\inetpub\wwwroot\KenticoCMS\bin\SchedulerService.exe).

/LogToConsole - optional parameter defining if installation progress will be logged to console.

/i - if this parameter is used, the Installer Tool performs installation of the Windows service.


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


3. To verify that the service is installed successfully, open Services management console (type services.msc into the Start menu search box). In the list of installed services, you should see the Kentico CMS Scheduler (<CMSApplicationName web.config key value>) service. The service is not running initially. To start it, click the Start Service button in the top toolbar, as highlighted in the screenshot below.




Uninstalling the Scheduler Windows service from the command line


Uninstalling the Scheduler Windows service can be performed exactly the same way as described above, while you only need to use the /u parameter instead of /i at the end of the command:


InstallUtil /webpath="C:\inetpub\wwwroot\CMS" "c:\Program Files (x86)\KenticoCMS\6.0\Bin\SchedulerService.exe" /LogToConsole=true /u


After executing this command, the Scheduler Windows service for the instance of Kentico CMS specified by the /webpath parameter will be uninstalled.