I have a while loop which will run forever as I need. Now I want to run scheduler in that loop and I want to run some command after every hour in that loop. Is this possible ? Current code . I dont want to use sleep since I want to continuously check for other codes so don't suggest SLEEP ,JAVASCRIPT & CONJOBS
<?php
set_timelimit(0);
while(true)
{
getChat();
//Here I want to run a function after every hour. How do I do it ?
if(everyhour)
{
runthisfunction()
}
}