Run php script as windows 10 services using nssm

125 Views Asked by At

I have a PHP script inside c:users\xampp\htdocs\myapp\myphpscript.php

What I want is to make a windows service that runs this PHP script in the background. So I searched for some questions here but they were not effective. Is there anyone who can help me to make a windows service using nssm that executes for my script.

1

There are 1 best solutions below

3
Zubair Ahmd On BEST ANSWER

Create a batch file with following content and put it in windows startup ;)

start /b path-to-php-installation\php c:\users\xampp\htdocs\myapp\myphpscript.php