This project use Symfony 4 and the Win32Service Bundle for integrate the Win32Service Extension into the project.
For run this example, you need this:
- PHP 7.1 or newer
- The PHP extension Win32Service 0.4 or newer
- Composer for install the project dependencies
After install PHP and the Win32Service extension, download this repository.
Unzip the archive content when you want.
Note: The path nost does not contains space or long name.
Execute the command
php composer.phar install -o
Read into the config/bundles.php.
Read the configuration into the file
Read the code into this class
Read the configuraion of the service
Register the service before the starting with this command:
php bin\console win32service:register
Now start the new service:
php bin\console win32service:action start
After a moment, stop the service:
php bin\console win32service:action stop
When you want update the service settings or uninstall the project, execute this command :
php bin\console win32service:unregister