Advanced Installation TopicsSana Commerce Task Service

Sana Commerce Task Service

Sana Commerce 9.1
Your connector

How to Install Task Service?

Sana Commerce scheduled tasks can be installed within the system or as a Windows service.

To install Sana Commerce Task Service:

Step 1: Copy the TaskService folder from the Sana Commerce release package to the server where the Sana Commerce Task Service should be installed.

Step 2: Open the 'Sana.Commerce.TaskService.exe.config' configuration file.

Step 3: In the 'Sana.Commerce.TaskService.exe.config' configuration file you need to enter the connection string to the SQL database and the AesKey and AesVector security keys. They are stored in the encrypted state in the 'Web.config' file of the Sana Commerce frontend. Thus, copy the entire "connectionStrings" and "sanaCommerce/securityKeys" encrypted sections from the 'Web.config' file of the Sana Commerce frontend and replace those in the 'Sana.Commerce.TaskService.exe.config' configuration file.

If you install the Sana Commerce Task Service for the Sana Enterprise edition you should also change:
  • The path to the shared index directory.
  • The path to the shared logs directory.

For more information, see 'Install Sana Enterprise'.

Step 4: Open the command prompt, navigate to the 'Sana.Commerce.TaskService.exe' application file and install the Sana Commerce Task Service using the -i parameter:

Sana.Commerce.TaskService.exe -i

When you execute this command it will install the Sana Commerce Task Service.

The table below provides the description of the available parameters:

Parameters Description
-i Install the Windows service with the default name 'Sana Commerce Task Service'.
-i [service name] Install the Windows service with the specified name.
-u Uninstall the Windows service with the default name 'Sana Commerce Task Service'.
-u [service name] Uninstall the Windows service with the specified name.
-run <task name> Run the exact task.
-help View help.

Step 5: Open the 'Web.config' file of the Sana Commerce Frontend. Change the value of the TaskServer parameter to 'false' in the <appSettings> configuration section.

Step 6: Copy the Sana license file from the 'bin' folder of the Sana Commerce Frontend to the Task Service folder. This is needed for the 'Sitemap export' task, otherwise it will not work.

Step 7: Open the Microsoft Services Management Console and start the Sana Commerce Task Service.

By default the Sana Commerce Task Service is running under Local Service.

If you install the Sana Commerce Task Service on the same Web server where Sana Commerce is installed you can run it under the same user that is used to run the Sana Commerce application pool.

If the Sana Commerce Task Service is installed on a separate server you can run it under a separate account. If you setup the Sana Commerce Task Service to run under a separate account make sure that this user has read/write permissions to the '@data' folder of the Sana Commerce solution and access to the Sana Commerce database.

When the Sana Commerce Task Service (Windows service) is installed, it will be used to periodically send the request to Sana Admin to keep the connection between the scheduled tasks and Sana Admin instead of the Sana Commerce system task (System - task scheduler).

For more information about Sana Commerce tasks, see 'Scheduled Tasks'.

Scheduled tasks can run on a separate server than the Web server. This allows to distribute the workload across multiple servers. If you install Sana Commerce on multiple servers, in Sana Admin you can configure on which server scheduled tasks should run. For more information, see 'Server Management'.

Advanced Installation TopicsSana Commerce Task Service