WP Crontrol

Opis

WP Crontrol lets you view and control what’s happening in the WP-Cron system. From the admin screens you can:

  • View all cron events along with their arguments, recurrence, callback functions, and when they are next due.
  • Edit, delete, and immediately run any cron events.
  • Add new cron events.
  • Add, edit, and remove custom cron schedules.

The admin screen will show you a warning message if your cron system doesn’t appear to be working (for example if your server can’t connect to itself to fire scheduled cron events).

Usage

  1. Go to the Tools -> Cron Events menu to manage cron events.
  2. Go to the Settings -> Cron Schedules menu to manage cron schedules.

Zrzuty ekranów

  • New cron events can be added, modified, deleted, and executed.
  • New cron schedules can be added, giving plugin developers more options when scheduling events.

FAQ

What’s the use of adding new cron schedules?

Cron schedules are used by WordPress and plugins for scheduling events to be executed at regular intervals. Intervals must be provided by the WordPress core or a plugin in order to be used. As an example, many backup plugins provide support for periodic backups. In order to do a weekly backup, a weekly cron schedule must be entered into WP Crontrol first and then a backup plugin can take advantage of it as an interval.

How do I create a new PHP cron event?

In the Tools -> Cron Events admin panel, click on the „Add PHP Cron Event” tab underneath the cron event table. In the form that appears, enter the schedule and next run time in the boxes. The event schedule is how often your event will be executed. If you don’t see a good interval, then add one in the Settings -> Cron Schedules admin panel. In the „Hook code” area, enter the PHP code that should be run when your cron event is executed. You don’t need to provide the PHP opening tag (<?php).

How do I create a new regular cron event?

There are two steps to getting a functioning cron event that executes regularly. The first step is telling WordPress about the hook. This is the part that WP Crontrol was created to provide. The second step is calling a function when your hook is executed.

Step One: Adding the hook

In the Tools -> Cron Events admin panel, enter the details of the hook. You’re best off having a hookname that conforms to normal PHP variable naming conventions. The event schedule is how often your hook will be executed. If you don’t see a good interval, then add one in the Settings -> Cron Schedules admin panel.

Step Two: Writing the function

This part takes place in PHP code (for example, in the functions.php file from your theme). To execute your hook, WordPress runs an action. For this reason, we need to tell WordPress which function to execute when this action is run. The following line accomplishes that:

add_action( 'my_hookname', 'my_function' );

The next step is to write your function. Here’s a simple example:

function my_function() {
    wp_mail( 'hello@example.com', 'WP Crontrol', 'WP Crontrol rocks!' );
}
Are any WP-CLI commands available?

The cron commands which were previously included in WP Crontrol are now part of WP-CLI (since 0.16), so this plugin no longer provides any WP-CLI commands. See wp help cron for more info.

Recenzje

Sometimes life is MAGIC ! 🙂 Thank you !

I wanted to know if cron could be the reason of my websites „freezing” (loading and loding and loading…), and I found your plugin !
All needed information is just right here !
And your plugin even confirmed me that cron job is disabled on some of my websites by writing on top:
The DISABLE_WP_CRON constant is set to true. WP-Cron spawning is disabled.
Thank you so much !

Useful and almost perfect

would be 5 out of 5 if it had:

+ ability to sort ‚cron list’ data columns
* multiple selection/batch operations to allow delete of more than 1 item

Would love to see this if/when developer has time 😉

Otherwise a great tool to see whats happening behind the scenes, useful for detecting slow downs and issues with plugin upgrades and operations.

Solid tool

I have been using this tool for years – it is useful, efficient, reliable and continuously improved. Thank you to the authors!

Fantastic Tool

I’ve used this plugin on hundreds of different sites over the years to help uncover issues with WP-Cron in unfamiliar environments.

It’s always been reliable, and helped me find valuable clues many times. Thanks John and co for releasing and maintaining it.

great for testing

I use this as a testing tool all the time and it is exactly what I need. It has two pages that give two different sets of information about the cron and I need them both for testing so thanks

Przeczytaj 67 recenzji

Kontrybutorzy i deweloperzy

“WP Crontrol” jest oprogramowanie open source. Osoby mające wkład w rozwoju wtyczki.

Kontrybutorzy

Wtyczka “WP Crontrol” została przetłumaczona na 4 języki: Japanese, Brazilian Portuguese, Italian, English (Canada). Thank you to the translators for their contributions.

Przetłumacz wtyczkę “WP Crontrol” na swój język.

Interesuje cię rozwój wtyczki?

Browse the code or subscribe to the development log by RSS.

Log zmian

For WP Crontrol’s changelog, please see the Releases page on GitHub.