I've got a batch f开发者_开发百科ile that did:
php-cgi runfile.php >> log.txt
php-cgi runfile2.php >> log.txt
Which correctly ran the first and pushed out hte output into the log.txt then called runfile2 and pushed out into the log.txt
But then I changed it so it would start both scripts at the same time on separate processes so the 2nd script wouldn't have to wait; as:
start php-cgi runfile.php >> log.txt
start php-cgi runfile2.php >> log.txt
Which allows the scripts to correctly run (I think); but the log.txt shows no output.
Any ideas?
Thanks, Mike
This worked for me:
log.bat
start /B dir C:\ >> log1.txt
start /B dir C:\WINDOWS >> log2.txt
It works like a charm. I have a series of :
start C:/[path_to_php]/php -f C:/[path_to_scrip1].php > C:/[path_to_log1].txt
start C:/[path_to_php]/php -f C:/[path_to_scrip2].php > C:/[path_to_log2].txt
and it only worked like:
start /B C:/[path_to_php]/php -f C:/[path_to_scrip1].php > C:/[path_to_log1].txt
start /B C:/[path_to_php]/php -f C:/[path_to_scrip2].php > C:/[path_to_log2].txt
So thanks jnpcl.
精彩评论