Installing the Scheduler Windows service
Kentico EMS required
Features described on this page require the Kentico EMS license.
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:
Launch the Kentico ServiceManager utility from the Kentico program files group in the Windows Start menu.
- You can also launch the KSM utility from Kentico Installation Manager using the Services button.
Choose the Kentico instance where you want to install the service (select the CMS folder).
Select the Kentico Scheduler service.
Click Install.
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:
Open the Windows command line (type cmd in the Start menu search box)
Navigate to the .NET folder containing InstallUtil.exe (e.g. c:\Windows\Microsoft.NET\Framework64\v4.0.30319\).
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:.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.
Open the Services management console (type services.msc into the Start menu search box).
Select the Kentico Scheduler (<CMSApplicationName web.config key value>) service in the list.
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
Open the Windows command line (type cmd in the Start menu search box).
Navigate to the .NET folder containing InstallUtil.exe (e.g. c:\Windows\Microsoft.NET\Framework64\v4.0.30319\).
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.