I'm running a php script via Linux (not via my browser) (php script.php). Now, I want to limit the execution time to let's say 10 seconds, which means that after 10 seconds the process will shutdown by itself. How can I do that? Already tried set_time_limit. Already tried sleep(10); exit();
None of them made the script to shutdown.