While working on one of my projects .. I wanted to run background thread in windows. Its pretty simple in linux/unix kind of env.. just append "&" to the command.
To do the same thing in windows.. i had to use a windows service. The article has detailed steps to do the job.
I was testing the example provided in the article. The try to start Notepad as a service. When i started the service i was expecting to see the notepad window. But nothing like that happened. Not sure why.
To test it I created a simple php script which writes to a file.
<?php
$filename = "c:\\temp1.txt";
$fh = fopen($filename, 'w') or die(" Fatal ERROR can't open file");
while(true) {
fwrite($fh,"hi \n");
sleep(100);
}
fclose($fh);
?>
And in the "Application" key of the registery provided the following command
php test.php
Now when I started the command saw the logs in c:\temp.txt file.
To do the same thing in windows.. i had to use a windows service. The article has detailed steps to do the job.
I was testing the example provided in the article. The try to start Notepad as a service. When i started the service i was expecting to see the notepad window. But nothing like that happened. Not sure why.
To test it I created a simple php script which writes to a file.
<?php
$filename = "c:\\temp1.txt";
$fh = fopen($filename, 'w') or die(" Fatal ERROR can't open file");
while(true) {
fwrite($fh,"hi \n");
sleep(100);
}
fclose($fh);
?>
And in the "Application" key of the registery provided the following command
php test.php
Now when I started the command saw the logs in c:\temp.txt file.