I have a scheduled command as such:
public function schedule(Schedulable $scheduler)
{
return $scheduler->everyMinutes(1);
}
Is there a way to get this to run every ten seconds?
I have a scheduled command as such:
public function schedule(Schedulable $scheduler)
{
return $scheduler->everyMinutes(1);
}
Is there a way to get this to run every ten seconds?
What you are thinking off is something called long-polling and it does not scale good on PHP especially when you use blocking IO.
Something like this:
set_timeout_limit(11);
$i=0;
while ($i<10) {
i = i + 1;
sleep(1); // sleep 1 second
}
Calling A PHP Function Every Second
Also: