説明
WP Crontrol enables you to take control of the scheduled cron events on your WordPress website or WooCommerce store. From the admin screens you can:
- View all scheduled cron events along with their arguments, schedule, callback functions, and when they are next due.
- Cron イベントの編集、削除、一時停止、再開、即時実行が可能。
- 新しい Cron イベントの追加。
- cron イベントの一括削除
- 任意の cron スケジュールの追加と削除
- Cron イベントリストを CSV ファイルとしてエクスポート、ダウンロードすることができます。
WP Crontrol はタイムゾーンを認識し、アクションが無かったり、スケジュールを逃したイベントを警告し、Cron システムで何らかの問題を検出した場合、役立つ警告メッセージを表示します。
使い方
- Cron イベントを管理するには、
ツール -> Cron イベント
メニューに移動します。 - cron スケジュールを管理するには、
設定 -> Cron スケジュール
メニューに移動します。
Documentation
For site owners
WP Crontrol is an essential tool for owners of WordPress websites and WooCommerce stores to ensure that scheduled cron events run correctly and efficiently. By providing complete control over cron events, WP Crontrol helps you:
- Improve reliability: Quickly address missed or failed cron events, ensuring your website or WooCommerce store continues to function as expected.
- Enhance security: Monitor and control cron events to ensure automatic update checks are performed as they should.
- Simplify management: Add, edit, delete, and pause cron events from a user-friendly interface, without needing to write any code.
- Gain insights: Export cron event data for analysis or reporting.
- Action Scheduler compatibility: Full support for the Action Scheduler system in WooCommerce, which is used to process recurring payments, subscriptions, and background orders.
- Clarity of times and timezones: All times are shown with a clear and accurate indication of which timezone applies. No more guesswork!
For developers
WP Crontrol is an invaluable tool for developers to streamline and debug their WordPress development process:
- Enhanced debugging: Easily identify and troubleshoot issues with scheduled tasks, ensuring your scheduled events and their callbacks run as expected.
- Custom schedules: Create and manage custom cron schedules to fit the specific needs of your website, plugins, or themes, providing greater flexibility than just the core schedules.
- Efficient workflow: Quickly add, edit, and delete cron events directly from the WordPress admin interface, saving time and reducing the need for manual coding.
- Insightful monitoring: Gain insights into the performance and behavior of your scheduled tasks, allowing for better optimization and resource management.
- Accurate debugging: WP Crontrol goes to great lengths to ensure that running an event manually does so in a manner which exactly matches how WordPress core runs schdeuled events. This ensures that you can debug events accurately and with confidence.
他のプラグイン
他にも開発者向けのプラグインをいくつか管理しています。ぜひご覧ください。
- Query Monitor は WordPress 開発者向けのツールパネルです。
- User Switching は、WordPress のユーザーアカウントを瞬時に切り替えることができます。
個人情報の取り扱いについて
WP Crontrol は、デフォルトではプライベートであり、常にそうです。第三者にデータを送信したり、第三者のリソースを含むことはありません。 WP Crontrol のプライバシーに関する声明の全文は、こちらでご覧いただけます。
アクセシビリティに関する声明
WP Crontrol は、すべてのユーザーが完全にアクセスできることを目指しています。WP Crontrol のアクセシビリティに関する声明の全文は、こちらでご覧いただけます。
スクリーンショット
FAQ
-
このプラグインは、PHP 8 で動作しますか?
-
Yes, it’s actively tested and working up to PHP 8.4.
-
「サイトの WP-Cron システムへの呼び出しが頻発する問題がありました。」というエラーが表示されます。どうすればいいですか?
-
cron イベントがスケジュールに間に合わないことがあるのはなぜですか?
-
cron イベントを削除しても、すぐに元に戻ることがあるのはなぜですか?
-
イベントがプラグインによって追加された場合、プラグインは、イベントが欠落していることを確認するとすぐにイベントを再スケジュールした可能性があります。 これを回避するには、代わりに「このフックを一時停止する」アクションを使用できます。これは、一時停止しますが、実行時にアクションを実行しないことを意味します。
-
cron イベントを削除しても大丈夫ですか?
-
これは完全にイベントに依存します。お気に入りの検索エンジンでイベント名を検索すると、そのイベントがどのプラグインに属しているかがわかりますので、その上で削除するかどうかを判断してください。
イベントのアクションが「なし」と表示されている場合は、通常は削除しても問題ありません。アクションのないイベントの詳細については、他の FAQ を参照してください。
-
一部の cron イベントを削除できないのはなぜですか?
-
WordPress コアソフトウェアは、その機能の一部に cron イベントを使用しており、これらのイベントを削除すると WordPress がすぐに再スケジュールしてしまうため、削除することはできません。このため、WP Crontrol では、WordPress コアからこれらの永続的なイベントを削除することはできません。
これらのイベントを実行したくない場合は、代わりに「このフックを一時停止」アクションを使用できます。
-
イベントを一時停止するとどうなりますか?
-
イベントを一時停止すると、イベントのフックに関連付けられているすべてのアクションが無効になります。 イベント自体はそのまま残り、スケジュールに従って実行されますが、そのフックに関連付けられたすべてのアクションは無効になります。 これにより、イベントは動作しなくなりますが、欠落している場合に自動的に再スケジュールされるイベントとの完全な互換性を維持するためにスケジュールされたままになります。
イベントを一時停止すると、実際にはそのフックが一時停止するため、イベントを一時停止して再開すると、同じフックを使用するすべてのイベントが一時停止または再開されます。 これは、個々のイベントを個別に一時停止するよりもはるかに便利で信頼性があります。
-
イベントを再開するとどうなりますか?
-
イベントを再開すると、イベントのフックに関連付けられているすべてのアクションが再び有効になります。 同じフックを使用するすべてのイベントが再開されます。
-
cron イベントのアクションに「なし」が表示されているのはどういう意味ですか?
-
これは、cron イベントが指定された時間に実行されるようにスケジュールされているが、イベントが実行されたときにトリガーされる機能がないため、イベントが役に立たないことを意味します。
これは、プラグインを無効にしたときに、その cron イベントをクリーンアップしないプラグインが原因であることが多いです。お気に入りの検索エンジンを使ってイベント名を検索すると、どのプラグインに属しているかがわかりますので、その上で削除するかどうかを決めてください。
-
cron イベントの次の実行時間やスケジュールを変更するにはどうすればいいですか ?
-
イベントの横にある「編集」リンクをクリックすると、cron イベントの時間やスケジュールを変更することができます。
-
URL をリクエストする cron イベントを作成するにはどうすればいいですか?
-
From the Tools
Cron Events menu, click on Add New Cron Event. Select the “URL cron event” option, fill out the details, and press the “Add Event” button.You can read all about the features and security of URL cron events on the WP Crontrol website.
-
cron イベントに変更を加えても保存されないのはなぜですか?
-
cron イベントのリストをエクスポートすることはできますか?
-
はい、cron のイベント一覧画面の「エクスポート」ボタンから、イベント一覧の CSV ファイルをエクスポート、ダウンロードできます。このファイルは任意の表計算アプリケーションで開くことができます。
-
自サイトで実行されたすべての cron イベントの履歴ログを見ることはできますか?
-
まだですが、近いうちにこの機能を追加したいと考えています。
-
cron イベントやスケジュールの編集・追加・削除の履歴ログを見ることはできますか?
-
はい。優れた Simple History plugin には、WP Crontrol 経由で実行されたアクションのログを取るためのサポートが組み込まれています。
-
新しい cron スケジュールを追加しどの様に使用しますか?
-
Cron のスケジュールは、定期的に実行されるイベントをスケジュールするために WordPress やプラグインで使用されます。 イベントの間隔は、WordPress コアまたはプラグインによって提供され、使用される必要があります。 たとえば、多くのバックアッププラグインは定期的なバックアップをサポートしています。 毎週のバックアップを行うには、WP Crontrol に毎週の cron スケジュールを入力すると、バックアッププラグインはイベントの間隔としてそれを利用できます。
-
新しい cron イベントを作成するには?
-
定期的に実行される cron イベント機能を取得するには、2つのステップがあります。 最初のステップは、WordPressにフックについて伝えることです。 これは、WP Crontrol が提供するために作成された部分です。 2番目のステップは、フックが実行されたときに関数を呼び出すことです。
ステップ1: イベントを追加する
ツール
Cron イベントメニューで、「新規 Cron イベントの追加」をクリックし、フックの詳細を入力します。通常の PHP 変数の命名規則に準拠したフック名にするのが最良です。スケジュールは、フックが実行される頻度です。適切な間隔が表示されない場合は、設定 Cron スケジュールメニューで間隔を追加してください。ステップ2: 関数の記述
この部分はPHPコードで (例えば、テーマの
functions.php
ファイルで) 実行されます。フックを実行するために、WordPress はアクションを実行します。このために、このアクションが実行されたときに実行する関数を WordPress に伝える必要があります。次の行はこれを実現します:add_action( 'my_hookname', 'my_function' );
次のステップは、関数を書くことです。 ここに簡単な例があります:
function my_function() { wp_mail( 'hello@example.com', 'WP Crontrol', 'WP Crontrol rocks!' ); }
-
新しい PHP cron イベントを作成するにはどうすればよいですか ?
-
ツール
Cron イベントメニューで、「新規 Cron イベントの追加」をクリックします。「PHP Cron Event」を選択し、スケジュールと次回の実行時間を入力します。イベントのスケジュールは、イベントが実行される頻度です。良い間隔が見当たらない場合は、「設定」 「Cron スケジュール」メニューで追加してください。「PHP コード」領域に、cron イベントの実行時に実行する必要がある PHP コードを入力します。PHPの開始タグ(<?php
)は必要ありません。PHP cron イベントの作成、編集、実行には、制限されたセキュリティ権限が適用されます。 PHP cron イベントの機能とセキュリティについては、WP Crontrol ウェブサイトですべて読むことができます。
-
どのユーザーが PHP cron イベントとスケジュールを管理できますか ?
-
manage_options
権限を持つユーザーだけが cron イベントとスケジュールを管理できます。デフォルトでは、管理者のみがこの機能を備えています。 -
PHP の cron イベントを管理できるユーザーは?これは危険なのでしょうか?
-
edit_files
権限を持つユーザーのみが PHP の cron イベントを管理することができます。これは、ユーザーが WordPress 管理エリアを介してファイルを編集できない場合(プラグインエディタやテーマエディタなど)、WP Crontrol 内で PHP の cron イベントを追加、編集、削除できないことを意味します。デフォルトでは、管理者のみがこの機能を持ち、マルチサイトを有効にすると特権管理者のみがこの権限を持つようになります。DISALLOW_FILE_MODS
やDISALLOW_FILE_EDIT
の設定定数でファイル編集が無効になっている場合、どのユーザーもedit_files
の権限を持つことができません。すなわち PHP cron イベントの追加、編集、削除が許可されません。そのため、WP Crontrol を有効にしても、任意の PHP コードを実行するのに必要なユーザーのアクセスレベルは変わりません。
If the
CRONTROL_DISALLOW_PHP_EVENTS
constant is defined and set totrue
, then PHP cron events will be disabled completely. Any existing PHP cron events will remain in place (and can be deleted if user permissions allow) but their PHP code will not be executed when the event runs, and no PHP cron events can be added, edited, or run.PHP cron イベントの機能とセキュリティについては、WP Crontrol ウェブサイトですべて読むことができます。
-
WP-CLI コマンドは利用できますか ?
-
以前に WP Crontrol に含まれていた Cron コマンドは、WP-CLI 自体の一部になりました。 詳細については、
wp help cron
を参照してください。 -
WP Crontrol プラグインを無効化するとどうなりますか?
-
セキュリティバグを報告するにはどうすればよいですか?
-
You can report security bugs through the official WP Crontrol Vulnerability Disclosure Program on Patchstack. The Patchstack team helps validate, triage, and handle any security vulnerabilities.
-
プラグインのヘッダー画像の写真は誰が撮ったものですか?
-
この写真は、Michael Pardoが撮影したもので、パブリックドメインです。
評価
貢献者と開発者
変更履歴
1.18.0 (13 January 2025)
- Introduces support for a
CRONTROL_DISALLOW_PHP_EVENTS
constant to fully disable the PHP cron event functionality. Full documentation here. - Further improvements to how time durations and timezone information is displayed.
1.17.1 (22 November 2024)
- Confirms support for WordPress 6.7
- Avoids some warnings when running on PHP 8.3 and 8.4
1.17.0 (15 July 2024)
- Introduces a new cron event type for sending a request to a URL
- Confirms support for WordPress 6.6
- Improves various aspects of the cron management interface and language
1.16.3 (19 April 2024)
- Corrects the displayed PHP cron event name if one is provided
1.16.2 (24 March 2024)
- Security hardening: An anti-tampering mechanism has been introduced for PHP cron events
- Improvements to accessibility and internationalisation
- Removes the dependency on jQuery
- Confirms support for WordPress 6.5
1.16.1 (16 November 2023)
- Confirms support for WordPress 6.4
1.16.0 (17 October 2023)
- Allow persistent WordPress core hooks to be cleared if there’s more than one event with that hook
- Add the number of matching events to the hook deletion link text
- Scrap the Ajax request that checks if the current page of cron events has changed since loading
- Make some improvements to sorting the cron event list table columns
- Increase the minimum supported PHP version to 7.4
1.15.3 (30 June 2023)
- Pass the
$doing_wp_cron
value to thecron_request
filter so it matches WordPress core - Miscellaneous code quality improvements
1.15.2 (15 March 2023)
- Improves the terminology around pausing and deleting hooks and events
- Improves accessibility of the event listing table for keyboard users
- Removes an unnecessary SQL query when fetching the list of paused events
- Adds an FAQ about deactivating the plugin
1.15.1 (29 December 2022)
- Confirms the plugin is compatible with PHP 8.2
- Increases compatibility with other plugins that include very old Composer autoloader implementations
Earlier versions
For the changelog of earlier versions, refer to the releases page on GitHub.