How to make a background call to the PHP pages?

Good day
There is a PHP page that accepts data via an AJAX request
But after getting/saving the data I need to run another PHP page to the data processed came
The handler should be run in the background (as CRON scripts)
Is it possible with the first PHP page (receiver) in this mode, to call the second PHP page (the handler)?
The point is not to delay the AJAX response, as AJAX'have it is important to ensure successful reception of the data, not in processing
Perhaps there is some alternative
Thank you in advance for your help!
July 2nd 19 at 17:57
2 answers
July 2nd 19 at 17:59
Solution
July 2nd 19 at 18:01
Solution
You can create the queue, when Your Ajax handler prepares and records data for processing, makes the processing job in a queue (e.g. a database table) and is responsible for AJAX that everything is recorded.
Another instance of PHP in CLI mode starts up, reads the queue and does the job (it already runs on a schedule from CRON for example), or runs continuously waiting jobs from the queue.

You can just script to run PHP in CLI mode to process the job (popen, pclose)
Yeah, I was thinking
Just got an extra action
I thought maybe there is some kind of magical feature :) - rigoberto commented on July 2nd 19 at 18:04

Find more questions by tags PHP