I want to convert this PHP script which works great on a Unix system into a script for Windows.
I don't know how to rewrite it. Can someone help me?
Here is the script:
$cmd = 'nohup sudo -u '.$user.' bash -c "cd ' .
escapeshellarg($path) . '; VVERBOSE=true QUEUE=' .
escapeshellarg($queue) . ' APP_INCLUDE=' .
escapeshellarg($bootstrap_path) . ' INTERVAL=' .
escapeshellarg($interval) . ' CAKE=' .
escapeshellarg(CAKE) . ' COUNT=' . $count .
' php ./resque.php';
$cmd .= ' > '. escapeshellarg($log_path).' 2>&1" >/dev/null 2>&1 &';
passthru($cmd);
passthru is a method in PHP see http://php.net/manual/en/function.passthru.php
Do you know what the script does? Maybe reverse engineer it into windows batch script?
From the looks of it, the script came from a *nix system it:
That script is imo, is impossible to "covert" to Windows batch script (since Windows != POSIX), you need to rewrite it.