I can create a bash script that runs a PHP file over and over with a 3 second delay like this:
php -q /home/script.php
sleep 3
php -q /home/script.php
sleep 3
php -q /home/script.php
But I'm looking for a better way to do this, so I don't have to create a file with hundreds of thousands of lines and then check to see when it's done so I can just restart it.
Is there any way to create a loop that runs a PHP file and once it's done, it just does it again - for an infinite amount of time (with a 3 second delay between each run)?