Such a task, you need to force one script to work on the site after a certain time, it is desirable that it was js, or that it was php that runs the js code. How to implement correctly? I want the script to work every hour. I emphasize that it is important that the js script is not dependent on the page from which it was launched. The logic is that php is launched from the page, which the user who ran the code or not on the site should not care. The script, for example, should constantly ping one domain and put all this in the logs. How to make php work constantly? So I went to the script settings page, set the interval, launched it and forgot, and it works.
I understand correctly that just throwing everything in while(true) will not help?
setTimeoutfunctions, the interval for which you take from the cache (memcached / redis / regularfile). The page with an interval changes it. - vp_arth