前言介紹
- 這款 WordPress 外掛「WP Crontrol Hours」是 2022-11-07 上架。
- 目前有 60 個安裝啟用數。
- 上一次更新是 2024-12-02,距離現在已有 152 天。
- 外掛最低要求 WordPress 5.8 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.6.20 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
wp cron | after hours | limit hours | business hours | restrict hours |
內容簡介
透過限制在您的網站低流量時段觸發 CRON 作業,您可以掌控 CRON 作業。您可以透過管理畫面進行以下操作:
指定重複 CRON 事件應該在每天何時觸發。
可選擇性地將在一天中頻繁運行的事件更新為每天運行一次。
針對特定的時間表進行操作,包括由其他外掛程式建立的自訂時間表。
排除特定的 CRON 鉤子不受影響。
益處
將重複的 CRON 事件限制只在繁忙時段之後執行有助於以下兩點:
防止 WordPress 核心、外掛程式和主題的自動更新在您的高流量時段運行,這樣使用者在最容易看見的時候不會看到維護頁面。
當自動維護在低流量時段進行時,您的伺服器上的壓力較小。
確保 CRON 事件總是執行
WordPress CRON 基於流量運作,這意味著如果您的網站流量不大,CRON 事件可能不會在其預定時間觸發。在依賴站點流量觸發的同時將您的網站 CRON 事件限制在非上班時間可能無法產生預期的結果。我建議以下兩點解決方法:
使用伺服器 CRON。WordPress 開發人員資源中建議設置系統的工作排程器以在所需的間隔執行並使用它來對 wp-cron.php 發出網路請求。 查看 WordPress 文件。
使用 Cron-Job.org。如果您無法設置系統的工作排程器,我建議將該任務外包給 Cron-Job.org,讓其自動 ping 您網站的 wp-cron.php 檔案。這是德國開發人員提供的免費服務。前往 Cron-Job.org。
原文外掛簡介
Take control of your CRON jobs by restricting them to your website’s low traffic hours. From the admin screen, you can:
Specify a daily window of when recurring CRON events should be triggered.
Optionally limit events that run multiple times a day to only once a day.
Optionally restrict events that run multiple times a day to only during your off-hours.
Target specific schedules, including custom ones created by other plugins.
Exclude specific CRON hooks from being affected
Benefits
Restricting your recurring CRON events to only run after hours helps with two (2) things:
Automatic updates for WordPress core, plugins, and themes are prevented from running during your highest-traffic times so users aren’t shown a maintenance page when it’s the most visible.
Less stress is placed on your server when automatic maintenance occurs during low traffic times.
Ensuring CRON Events Always Run
WordPress CRON is based on traffic, which means if your site does not see a lot of traffic, CRON events may not be triggered at the time that they are scheduled. Limiting your website’s CRON events to off-hours while also depending on site traffic to trigger them may not produce the intended results. There are two (2) solutions I recommend:
Use Server CRON. It is recommended in the WordPress developer resources to set up your system’s task scheduler to run on the desired intervals and to use that to make a web request to wp-cron.php. View WordPress Documentation.
Use Cron-Job.org. If you can’t set up your system’s task scheduler, I recommend outsourcing that job to cron-job.org to automatically ping your website’s wp-cron.php file. It is a free service from the German-based developers. Go to Cron-Job.org.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「WP Crontrol Hours」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.1.0 | 2.0.0 | 2.1.0 | trunk |
延伸相關外掛(你可能也想知道)
暫無相關外掛推薦。