最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - action-scheduler vs wp-background-processing

programmeradmin5浏览0评论

I am trying to create a user registration form that sends OTP over Email and SMS and display an OTP screen after the whole process completes.

How can I make the send_mail and send_sms to be in the background? I know it can be done through Ajax directly to reduce the processing time. But I am making this plugin on top of another one. So ajax way is not to fit in my case. I need to complete the whole thing in one PHP process. So I choose action-scheduler or wp-background-processing that schedule the jobs (send_mail and send_sms), complete the PHP process and display an OTP screen to user.

I need some help choosing the one fit for my plugin. Do both of the libraries provide job scheduling in the same way?

What will happen if 1000 users registered at once? Considering send_email and send_sms takes only 10 sec. How much time it will take to send an email and SMS to the 1000th user who is last in the queue? Is that user going to get the OTP after 999*10sec? So I don't think it is perfect for my application. An OTP after 999*10 sec to too much of waiting time.

If I understand it perfectly what is the alternative way to achieve that?

发布评论

评论列表(0)

  1. 暂无评论