Yes, you can, but it's really annoying as sometimes you can just use exec with a redirect with something like
$cmd = 'phpcli.exe football.php > nul 2>&1';
exec($cmd);
phpcli is what your cli php script would be called. That used to work for me fine, and now doesn't, but you can use the windows shell and COM instead
/**
* Well it's not really run in background is it - as you've got a choice
*
* @param string command to run
* @param int window style
* @param bool wait before returning - set to false and it will run in bg
*/
function run_in_bg($cmd, $winStyle = 0, $waitOnReturn = false)
{
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($cmd, $winStyle, $waitOnReturn);
$WshShell->Release();
return $oExec;
}
run_in_bg('phpcli myscript.php', 0, false);
Use that to execute a php command line, you don't have to redirect. Use zero and false for the 2nd and 3rd params and you'll never be aware it's run.
If you want more info on the window style parameters go to http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/wsh/htm/wsMthRun.asp