Asynchronize PHP function with long execution time
-
Hello,
I’m working on a plugin and my function is already working well on a limited amount of data but when using a large amount, it simple take too long, it insert post and postmeta via WP_Query on some Custom Type Post.
So I would like to know which method to make a PHP task asynchronous is to be recommended, using the Cron of WordPress, Ajax or Something else?
I would like not to be limited by timeouts, nor by the user leaving the page before the end of the execution. If possible stay as close as possible to the native behavior of WordPress / WooCommerce.
I’m fine to use an external library but if I can avoid it I’d like as much.
The topic ‘Asynchronize PHP function with long execution time’ is closed to new replies.