[WordPress] 外掛分享: Advanced Cron Scheduler for WordPress

首頁外掛目錄 › Advanced Cron Scheduler for WordPress
WordPress 外掛 Advanced Cron Scheduler for WordPress 的封面圖片
200+
安裝啟用
★★★★★
5/5 分(5 則評價)
323 天前
最後更新
問題解決
WordPress 6.5+ PHP 7.1+ v1.1.4 上架:2021-03-02

內容簡介

WordPress中的WP-Cron系統不是一個真正的cron系統,這意味著事件可能不會按照其時間表準確運行,因為該系統依賴於定期訪問網站來觸發計劃的事件。

WP-Cron事件錯過時間表的原因

低流量的網站可能不會足夠觸發事件運行
由插件或佈景主題引起的致命錯誤可能會中斷事件運行
插件或佈景主題可能有意或無意地中斷事件運行
BasicAuth、防火牆或其他訪問限制可能阻止事件運行
您的網站託管或網絡服務器可能會中斷事件運行
啟用了DISABLE_WP_CRON 配置常量,但沒有替代的cron運行器
長時間運行的事件可能會暫時阻塞事件運行
高流量的網站可能會遭受順序處理問題,從而封鎖事件運行

Advanced Cron Scheduler for WordPress插件通過Action Scheduler庫更改了WordPress核心運行cron事件的方式。

Action Scheduler是一個可擴展的,可跟踪的作業隊列,用於在WordPress中背景處理大量的操作。它是專門設計用於WordPress插件的分布式。

Action Scheduler的工作方式是在將來的某個時間觸發一個動作掛鉤。每個掛鉤都可以以唯一的數據進行調度,以允許回調對該數據執行操作。掛鉤還可以安排在一個或多個場合運行。

可以將其視為對do_action()的擴展,它添加了延遲和重複鈎子的能力。

經過戰斗考驗的背景處理

每個月,Action Scheduler處理數百萬的< a href="https://woocommerce.com/products/woocommerce-subscriptions/" rel="nofollow ugc">Subscriptions支付,WooCommerce 的Webhook以及其他插件的電子郵件和事件。

在實際網站上,已見到其處理超過50,000個作業的隊列,並且以每小時超過10,000次的持續速率進行資源密集操作,例如處理付款和創建訂單,而不會對正常的站點操作造成負面影響。

這一切都是在插件作者無法控制的基礎設施和WordPress站點上實現的。

如果您的插件需要背景處理,尤其是大量任務的背景處理,Action Scheduler可以幫助您。

了解更多

要了解有關Action Scheduler的操作方式以及如何在插件中使用它的更多信息,請查看ActionScheduler.org上的文檔。

在那裡您會找到:

使用指南:有關安裝和使用Action Scheduler的說明
WP CLI指南:使用WP CLI批量運行Action Scheduler的指令
API參考:所有API函數的完整參考指南
管理指南:通過管理屏幕管理預定的操作指南
大規模背景處理指南:使用默認的WP Cron隊列運行Action Scheduler的指令

支援

通過插件支援論壇,獲取社群支援。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Advanced Cron Scheduler for WordPress」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

The WP-Cron system in WordPress is not a “real” cron system, which means events may not run exactly according to their schedule because the system relies on regular traffic to the website in order to trigger scheduled events.
Reasons WP-Cron events can miss their schedule

Low traffic websites may not trigger the event runner often enough
A fatal error caused by a plugin or theme may break the event runner
A plugin or theme may intentionally or unintentionally break the event runner
BasicAuth, a firewall, or other access restrictions may block the event runner
A problem with your web hosting or web server may break the event runner
The DISABLE_WP_CRON configuration constant is set but no alternative cron runner has been put in place
Long-running events may temporarily block the event runner
High traffic websites may suffer from sequential processing issues that block the event runner

The Advanced Cron Scheduler for WordPress plugin does alter the way that WordPress core runs cron events using the Action Scheduler Library.
Action Scheduler is a scalable, traceable job queue for background processing large sets of actions in WordPress. It’s specially designed to be distributed in WordPress plugins.
Action Scheduler works by triggering an action hook to run at some time in the future. Each hook can be scheduled with unique data, to allow callbacks to perform operations on that data. The hook can also be scheduled to run on one or more occassions.
Think of it like an extension to do_action() which adds the ability to delay and repeat a hook.
Battle-Tested Background Processing
Every month, Action Scheduler processes millions of payments for Subscriptions, webhooks for WooCommerce, as well as emails and other events for a range of other plugins.
It’s been seen on live sites processing queues in excess of 50,000 jobs and doing resource intensive operations, like processing payments and creating orders, at a sustained rate of over 10,000 / hour without negatively impacting normal site operations.
This is all on infrastructure and WordPress sites outside the control of the plugin author.
If your plugin needs background processing, especially of large sets of tasks, Action Scheduler can help.
Learn More
To learn more about how to Action Scheduler works, and how to use it in your plugin, check out the docs on ActionScheduler.org.
There you will find:

Usage guide: instructions on installing and using Action Scheduler
WP CLI guide: instructions on running Action Scheduler at scale via WP CLI
API Reference: complete reference guide for all API functions
Administration Guide: guide to managing scheduled actions via the administration screen
Guide to Background Processing at Scale: instructions for running Action Scheduler at scale via the default WP Cron queue runner

Support

Community support via the support forums at WordPress.org.

Contribute

Active development of this plugin is handled on GitHub.
Feel free to fork the project on GitHub and submit your contributions via pull request.

Credits
Action Scheduler is developed and maintained by Automattic.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon