Breeze Runtime as a Windows Service
This page shows how Breeze Runtime can be run in the background as a Windows Service, and started and stopped like other services, including automatically when the PC starts. This is optional, and a good alternative i to launch the Runtime process manually and control it from a third party application.
About running Runtime as a service
A Windows Service is a special type of application in Microsoft Windows that runs in the background and performs tasks without requiring user interaction. A service can not have a user interface.
The service account
As all Windows services, the Breeze Runtime service can be configured to run as a specific user account. Breeze will load settings and save log files in the %userprofile%\.Prediktera
folder and sub folders of this service user. This is normally separate from the regular user you use on a PC.
Folders used by the service
The %userprofile%\.Prediktera\Breeze
folder of the service account is where the Runtime log files are located when you run the Runtime as a service.
In addition the Runtime will use a specific workspace (Workspace guide). This workspace is specified in Breeze when logged on as the service account, or by editing the file %userprofile%\.Prediktera\settings.yaml
in the service account's folder.
How to configure the service
The Runtime service account needs to be able to run Breeze
To ensure that Breeze will work as the service account, you need to log on to the PC using this account at least once and start Breeze. This creates the necessary .Prediktera\Breeze
folder in the user’s profile directory. It also gives you the opportunity to license Breeze for that user (since Breeze is licensed per user of a PC). See Licensing.
Creating the service and configure its service account
The service is created via the Create-Service.bat
script (assuming default install location the script files will be located in C:\Program Files\Prediktera\Breeze\Scripts). This script creates the Breeze Runtime Service which then can be managed from Windows Services control panel:

In Services, double-click on the service to change the Log On user to the service account you’ll use:

Grant the ‘Log on as a service’ permission
The service account needs the Log on as a service Windows permission on the PC. You can configure this in the Local Security Policy in Windows or using Group Policy for domain-joined PCs.
Removing the service
To remove the service if it no longer is needed, use the script Delete-Service.bat
.
Optionally controlling Runtime actions when the service is started
Aconfiguration.yaml
, located in the workspace root folder, can be used to control which Runtime workflow is loaded and which commands are issued when the service is started.
Note that the Runtime workflow you specify must be one that was exported to the Runtime from Breeze. You cannot load a regular Breeze workflow to use in the Runtime.
The format to use is:
workflow:
id: 7431d39d
#name: Nuts_Classification
commands:
- TakeDarkReference
- TakeWhiteReference
- StartPredict
id
and name
cannot be combined, this will result in an exception, so you must only specify one of them.
Once the service is started, the file will be loaded with the default camera settings and the camera will be initialized before the workflow is loaded.
You can also control the Runtime programmatically without using the configuration.yaml file. Learn more about Runtime workflows and controlling the Runtime in Introduction to Breeze Runtime development.
Troubleshooting the Runtime service
If the service doesn’t start, you can consult Windows Event Log to learn why.
If the service starts, consult the Breeze Runtime log file to learn what it does and any errors that occur. See Breeze log files and troubleshooting.