I am trying to run a PHP script every 2 seconds but i can only set a cron job for every minute.
I had the idea of using a for loop in PHP and running my code inside the loop X amount of times and the cron job then runs every minute but i don't know how long my script will take to run so it may not finish when the cron job restarts.
whats the best way to run it every 2 seconds?