This would require elevated privilege just to run bat file.. the most logical thing to do is create a logs repository where all your actions will be stored create a pusher/worker to check it everytime it updates.
Far more reality is use Firebase Database by google they have free live database feature that can help you solve that and monitored all data passing through it.
1gb of data is free can be used to create a simple website ang implements stuffs.
thing is they don't use sql query they use json/arrays for data.
sir Arjien gamit ko po localhost ngaun po, kapag may na receive po na update or message sa log.txt nais ko sana i run ung .bat file, Hall: kapag naka receive ng update si log.txt, execute datap ang test.bat, posibli po ba un maraming salamat sir
Yes, you can run bat file in PHP. With little research I see some results.
The point is how fast do you think your logs are being monitored? will any logs execute/trigger bat file?
Thing is you need to convert your data to arrays & store them in a .json file to count all values from this file.
by doing a count check you can monitor your logs faster.
You need a PHP program to run bat file.
Worker to write the logs.
Worker to monitor logs in logs.txt/or .json file.