I have a linux bash scripts that runs continuously and request a php page. The php page does some magic and after 500ms the bash scripts request the php page again and php does some magic. This runs day in day out, but sometimes the bash crashes and that means that i needs to login to the machine and run the scripts again. No i'm looking for a solution that is totaly php driven.
I made the following test(s), but the won't work. FILE));
recursiveStopStart(true,$basepath);
function recursiveStopStart($mayrun = true,$basepath){
if ($mayrun == true){
sleep(1);
exec("C:\wamp\bin\php\php5.3.13\php.exe ".$basepath."/scripts/StopStart.php");
exec("C:\wamp\bin\php\php5.3.13\php.exe ".$basepath."/scripts/TestStopStart.php");
flush();
exit();
}
}
?>
StopStart.php is the scripts that does the magic. TestStopStartphp is the main php page which make the recursive idea.
I'm looking for a solution on which i request 1 page, that page calls the magic page and calls itself to run everything all over again.
A second reason to move to php is that i can make it platform independent (bash wont run on windows...).
Hope somebody could help me.