sleep() is definitely not the solution (I wonder why is is even considered here ...)
After a lot of experimenting I have arrived to the following solution: Execute "timed" PHPs (i.e. executed at intervals) via an HTML file containing a javascript timer and a frame:
<html>
<head>
<script type='text/javascript'>
var obj;
var interval = {interval_msecs};
var PHP_to_execute = "http://localhost/Work/{yourPHP}.php";
var timer = setInterval(function(){exec()}, interval);
function exec() {
obj = document.getElementById("PHParea");
obj.src = PHP_to_execute;
}
</script>
</head>
<body>
<iframe id="PHParea" src=""></iframe>
</body>
</html>
This is the basis (using a localhost). You can add whaterever feature you want to it.
sleep(120)...?