I need to perform a time-consuming task when the user clicks a button. Basically, I’ll be doing some processing on every post, sending requests to a remote server for many.

The user won’t need the result immediately, so I can run it in the background. But I need to be able to tell the user whether the task has finished yet or not (and the result if finished) when they visit that page again. Additionally, I don’t want them to be able to start another instance of the same task (by clicking the button) while the first one is still running.

Any way I can do all of the above?

Read more here: How to process a request in the background and later report the result?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: