I have two restful api endpoints; DispatchJob_Public.php and selectDriverForJobResult.php and I have to call selectDriverForJobResult.php from DispatchJob_Public.php after two minutes. How can i do that without using sleep()? Because i cannot afford putting server on busy wait (due to sleep function).
I have written a function in javascript and ajax to call the second file (selectDriverForJobResult.php), and that works fine when i hit the end point directly from browser but js doesnt work when the file is called from android or postman.
So i need a solution for this, that does not include cron job, javascript and sleep() function.
Thank you very much.