have a look at https://github.com/spatie/laravel-short-schedule
Is it safe to make sleep-recursive calls in Laravel API ?
Hello from France everyone !
I am actually running a CRON successfully calling a Laravel API endpoint every minute. Today, my project owner told me that he'd like that endpoint to be called one time every 5 seconds. CRON and Laravel Task Manager being not able to achieve that, I was thinking about calling 12 times recursively the said endpoint function with a time_sleep_until interval between each calls.
The problem is that I am not sure how Laravel/PHP process PHP scripts. Will that "one full minute running script" block the entire Laravel API server ? Or do each API call run in its own memory/program segment (whatever those are called in PHP world - sorry, I'm new in PHP ^^)
Thank you very much in advance !
Please or to participate in this conversation.