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

wp cron - How to Run Plugin on Server Without Web Browser

programmeradmin1浏览0评论

I have a function that requests product data from Amazon (get_product_data()) and would like to run this on my live site either on command or at regular intervals. To save the data into the database I need to use the Pods plugin.

I have thought of two ways to do this.

  1. Run as a wp cron job: The problem is the function takes several minutes to run and the unlucky visitor who loads the page and triggers the cron job will have to wait before seeing the page.

  2. Use a normal cron job/run on the server somehow (?).

Ideally I want the 2nd way but how can I use the Pods plugin if it's a normal cron job? Is there some way to load WordPress in my server without a web browser (I'm using Siteground by the way)?

I'm relatively new so I appreciate all the help!

发布评论

评论列表(0)

  1. 暂无评论