I am currently writing an online game. Now I have to check if an event has occurred (checking the timestamp in the database) and depending on what actions are being performed. I have to check the event every second.
I wanted to use cronjob, but with cron you can run a script only every minute.
My idea was to use cron and loop 60 times in my php script. But I think this is not the best solution.
So what is the best way to run a script every second?
source
share