There is a function in php that sends an sms, it takes about 3 seconds to execute this function, during which the modem is busy and if the function is called again, it simply will not work. The function of sending SMS is called in a loop for a group of numbers, each time in a loop, doBackground () is executed; The worker has time to get rid of all the tasks in the queue at once in these 3 seconds and only the first SMS is sent. Is there any way to configure a pause or a timeout?
PS In parallel, I try to configure the modem status check in the SMS sending function itself, but so far unsuccessfully
sleep(3)? - ilyaplot