內容簡介
如果 WP-Cron 停止運作,會發生什麼事情?
WordPress、佈景主題和外掛都不會知道是否有新版本推出。您可能每天登錄您的網站數月,但從不會看到任何有關更新的通知。如果您不小心,您的 WordPress 安裝很快就會過期,容易受到駭客攻擊。預定發佈的文章永遠不會被發布,自動草稿永遠不會被刪除……您明白了吧。您的網站將慢慢崩潰並死亡。
使用 Woocommerce?訂閱?客戶將再也沒有收到帳單!Session 永遠不會被刪除。預定的銷售活動永遠不會出現。您的網站將變得臃腫,同時發放一次性付款的訂閱。
WP-Cron 非常重要。因此,請確保它仍在正常運作。
將此外掛視為保險,但是免費的。WordPress、外掛、佈景主題和伺服器都是可以隨時更新的移動元件。您無法保證這些更改不會以某種方式破壞您的網站。雖然 WP-Cron 停止運作的機率不大,但如果確實發生,您最好了解。
每隔 24 小時,此外掛會自動檢查 WP-Cron 是否仍可運行。顯然,它不依賴 WP-Cron,而是設置其自己的過期時間短暫性。每當短暫性到期時,它都會檢查以確保 WordPress 可以運行 WP-Cron。如果發生意外錯誤,您將收到電子郵件通知。
除了檢查 WP-Cron 是否可以運行外,此外掛現在還記錄運行 WP-Cron 的所有鉤子的情況,包括失敗或完成的情況。您將能夠看到什麼時候運行、運行多長時間以及是否完成。
為方便起見,WP-Cron 狀態檢查器顯示在您的 WordPress 管理員儀表板上。可以通過工具-> WP Cron 狀態側邊菜單訪問狀態頁面。
知道 WP-Cron 何時未完成
當 WP-Cron 鉤子失敗時,您很快就會收到通知。當鉤子花費超過 5 分鐘才完成時,就算鉤子「失敗」。您將在 24 小時內收到電子郵件(或基於外掛設置)通知任何錯誤。
有時,外掛運行某些代碼,將突然退出該過程,無法知道其停止運作的時間。WP-Cron 狀態檢查器會盡最大努力檢測此類代碼。如果它被捕獲,則不計算所花費的時間,您將看到“N/A”和“未完成”狀態。當它被捕獲時,有其他狀態會顯示“退出”狀態,這被視為已完成。有關完成狀態的更多信息,請參閱外掛頁面。
PRO 版本
PRO 版本取消了 3 條日誌限制,讓您可以選擇保留日誌時間長度並更頻繁地發送電子郵件。有關更多信息,請參閱外掛頁面:https://webheadcoder.com/wp-cron-status-checker/
外掛標籤
開發者團隊
原文外掛簡介
What happens if WP-Cron stops working?
WordPress, Themes, and Plugins would never know if a new version is out. You could login to your website everyday for months, and never see any notices about updates. If you’re not careful you’ll soon have an out of date WordPress installation susceptible to hackers. Scheduled posts would never get published, auto drafts never deleted… you get the picture. Your website would crumble up and die.
Use Woocommerce? Subscriptions? Customers would never get billed again! Sessions would never be deleted. Scheduled sales would never appear. Your website would become bloated while giving away subscriptions for one time payments.
WP-Cron is important. So make sure it keeps working.
Think of this plugin as insurance, but free. WordPress, plugins, themes, and servers are all moving parts that can be updated at anytime. You can’t guarantee any of these changes won’t break your website in some way. While it’s not likely WP-Cron will stop working, if it does, you better know about it.
Every 24 hours this plugin automatically checks to see if WP-Cron is still able to run. Obviously, it does not depend on WP-Cron. Instead it sets its own transients that expire over 24 hours. Whenever the transient expires it checks to make sure WordPress can run WP-Cron. If an unexpected error occurs the you’ll get an email.
In addition to checking if WP-Cron CAN run, this plugin now logs all hooks running with WP-Cron and if they fail or complete. You’ll be able to see what ran, when it ran, how long it took, and if it completed.
For your convenience The WP-Cron Status Checker is displayed on your WordPress admin dashboard. The status page is accessible through the Tools -> WP Cron Status side menu.
Know when WP-Cron doesn’t complete
When a WP-Cron hook fails you’ll get notified soon after. A hook “fails” when it takes longer than 5 minutes to complete. You’ll get an email within 24 hours (or based on the plugin’s settings) to notify you of any failures.
Sometimes a plugin runs some code that abruptly exits the process and there is no way of knowing when it stopped. WP-Cron Status Checker does it’s best to detect this type of code. If it’s caught, the elapsed time is not recorded and you’ll see “N/A” with an “Incomplete” status. Other times when it’s caught you’ll see an “Exit” status which is considered complete. Please see the plugin page for more on completion statuses.
PRO Version
The PRO version removes the 3 log limit and lets you choose to keep logs longer and email more frequently. Please see more on the plugin page: https://webheadcoder.com/wp-cron-status-checker/
