I need to trigger a php script to run every 1-2 seconds (an email sender).
Because including it in my page footer would cause some delay visible to users, I want to trigger it in background, I was thinking to trigger an EXEC from page footer by PHP like this:
<?php
exec("curl http://example.com/script.php");
?>
but is the same because curl waits for the script to run, maybe curl has an option that just triggers this without waiting for the output?