'How to create a windows service that runs a PHP script?
I have a PHP application that is connected to MS SQL and it runs a script, based on the time that is stored in the database, to execute a particular query of another database server. Eg: database has a query column and the Next time of execution i.e. 1 pm Php Script keeps running through the windows service It keeps checking the current time, if it matches the next time of execution, it executes the query.
My question is, how can I set up this PHP application under a windows service?
Note: we don't want to use the cron job since it's not a web application We have tried using PHP win32_create_service but it does not work. Windows task scheduler has a limit of 5 mins as the lowest time. We might have some tasks which will need to be executed in every 1 minute too.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
