WP Crontrol

Beschreibung

WP Crontrol gibt dir die Möglichkeit anzuzeigen, was im WP-Cron-System passiert, und lässt dich dieses verwalten. In der Admin-Ansicht kannst du:

  • Alle Cron-Ereignisse mit ihren Argumenten, Wiederholungen, Callback-Funktionen anzeigen und wann sie das nächste Mal ausgeführt werden sollen.
  • Edit, delete, pause, resume, and immediately run cron events.
  • Neue Cron-Ereignisse hinzufügen.
  • Cron-Ereignisse per Massenverarbeitung löschen.
  • Füge individuelle Cron-Zeitpläne hinzu und entferne sie.
  • Export and download cron event lists as a CSV file.

WP Crontrol is aware of timezones, will alert you to events that have no actions or that have missed their schedule, and will show you a helpful warning message if it detects any problems with your cron system.

Nutzung

  1. Gehe zum Menü Werkzeuge → Cron-Ereignisse, um Cron-Ereignisse zu verwalten.
  2. Gehe zum Menü Einstellungen → Cron-Zeitpläne, um Cron-Zeitpläne zu verwalten.

Other Plugins

I maintain several other plugins for developers. Check them out:

  • Query Monitor is the developer tools panel for WordPress.
  • User Switching provides instant switching between user accounts in WordPress.

Privacy Statement

WP Crontrol is private by default and always will be. It does not send data to any third party, nor does it include any third party resources.

WP Crontrol’s full privacy statement can be found here.

Accessibility Statement

WP Crontrol aims to be fully accessible to all of its users. It implements best practices for web accessibility, outputs semantic and structured markup, adheres to the default styles and accessibility guidelines of WordPress, uses the accessibility APIs provided by WordPress and web browsers where appropriate, and is fully accessible via keyboard and via mobile devices.

WP Crontrol should adhere to Web Content Accessibility Guidelines (WCAG) 2.0 at level AA when used with a recent version of WordPress where its admin area itself adheres to these guidelines. If you’ve experienced or identified an accessibility issue in WP Crontrol, please open a thread in the WP Crontrol plugin support forum and I’ll address it swiftly.

Screenshots

  • Cron-Ereignisse können verändert, entfernt und ausgeführt werden

  • New cron events can be added

  • Neue Cron-Zeitpläne können hinzugefügt werden, um Plugin-Entwicklern mehr Optionen zu geben, Ereignisse zu planen

FAQ

Does this plugin work with PHP 8?

Yes, it’s actively tested and working up to PHP 8.2.

I get the error „There was a problem spawning a call to the WP-Cron system on your site“. How do I fix this?

You can read all about problems spawning WP-Cron on the WP Crontrol wiki.

Why do some cron events miss their schedule?

You can read all about cron events that miss their schedule on the WP Crontrol wiki.

Why do some cron events reappear shortly after I delete them?

If the event is added by a plugin then the plugin most likely rescheduled the event as soon as it saw that the event was missing. To get around this you can instead use the „Pause this hook“ action which means it’ll remain in place but won’t perform any action when it runs.

Is it safe to delete cron events?

This depends entirely on the event. You can use your favourite search engine to search for the event name in order to find out which plugin it belongs to, and then decide whether or not to delete it.

If the event shows „None“ as its action then it’s usually safe to delete. Please see the other FAQs for more information about events with no action.

Why can’t I delete some cron events?

The WordPress core software uses cron events for some of its functionality and removing these events is not possible because WordPress would immediately reschedule them if you did delete them. For this reason, WP Crontrol doesn’t let you delete these persistent events from WordPress core in the first place.

If you don’t want these events to run, you can use the „Pause this hook“ action instead.

What happens when I pause an event?

Pausing an event will disable all actions attached to the event’s hook. The event itself will remain in place and will run according to its schedule, but all actions attached to its hook will be disabled. This renders the event inoperative but keeps it scheduled so as to remain fully compatible with events which would otherwise get automatically rescheduled when they’re missing.

As pausing an event actually pauses its hook, all events that use the same hook will be paused or resumed when pausing and resuming an event. This is much more useful and reliable than pausing individual events separately.

What happens when I resume an event?

Resuming an event re-enables all actions attached to the event’s hook. All events that use the same hook will be resumed.

What does it mean when „None“ is shown for the Action of a cron event?

This means the cron event is scheduled to run at the specified time but there is no corresponding functionality that will be triggered when the event runs, therefore the event is useless.

This is often caused by plugins that don’t clean up their cron events when you deactivate them. You can use your favourite search engine to search for the event name in order to find out which plugin it belongs to, and then decide whether or not to delete it.

How do I change the next run time or the recurrence of a cron event?

You can change the time and recurrence of a cron event by clicking the „Edit“ link next to the event.

Wie kann ich ein Cron-Event erstellen, welches eine URL ansteuert?

From the Tools → Cron Events → Add New screen, create a PHP cron event that includes PHP that fetches the URL using the WordPress HTTP API. For example:

wp_remote_get( 'http://example.com' );

You can read all about the features and security of PHP cron events on the WP Crontrol wiki.

Warum werden Änderungen, die ich an Cron-Events mache, nicht gespeichert?

You can read all about problems with editing cron events on the WP Crontrol wiki.

Can I export a list of cron events?

Yes, a CSV file of the event list can be exported and downloaded via the „Export“ button on the cron event listing screen. This file can be opened in any spreadsheet application.

Kann ich ein historisches Protokoll aller Cron-Events sehen, die auf meiner Website gelaufen sind?

Not yet, but I hope to add this functionality soon.

Can I see a historical log of edits, additions, and deletions of cron events and schedules?

Yes. The excellent Simple History plugin has built-in support for logging actions performed via WP Crontrol.

Was ist der Sinn hinter dem Hinzufügen von neuen Cron-Zeitplänen?

Cron-Zeitplöne werden von WordPress und Plugins benutzt, um Ereignisse zu planen, die in normalen Intervallen ausgeführt werden. Intervalle müssen vom WordPress-Core oder von einem Plugin bereitgestellt werden, um benutzt werden zu können. Als Beispiel bieten viele Sicherungs-Plugins Unterstützung für periodische Sicherungen an. Um eine wöchentliche Sicherung zu erstellen, muss ein wöchentlicher Zeitplan zuerst in WP Crontrol hinzugefügt werden, damit ein Sicherungs-Plugin diesen Zeitplan als Intervall benutzen kann.

Wie erstelle ich ein neues Cron-Ereignis?

Es sind zwei Schritte erforderlich, um ein funktionierendes Cron-Ereignis zu erhalten, das regelmäßig ausgeführt wird. Der erste Schritt besteht darin, WordPress den Hook mitzuteilen. Das ist der Teil, für den WP Crontrol erstellt wurde. Der zweite Schritt ist, eine Funktion auszuführen, wenn dein Hook ausgeführt wird.

Schritt Eins: Den Hook hinzufügen

Klicke im Adminbereich unter Werkzeuge → Cron-Ereignisse auf „Cron-Ereignis hinzufügen“, um die Details zum Hook einzutragen. Am besten ist es, wenn der Hook-Name den normalen PHP-Variablen-Regeln entspricht. Der Ereignis-Zeitplan steht dafür, wie oft dein Hook ausgeführt werden wird. Wenn du kein passendes Intervall siehst, dann füge eins im Adminbereich unter Einstellungen → Cron-Zeitpläne hinzu.

Schritt Zwei: Schreiben der Funktion

Dieser Teil muss in den PHP-Code (beispielsweise in der functions.php deines Themes). Um deinen Hook auszuführen, führt WordPress eine Action aus. Aus diesem Grund müssen wir WordPress sagen, welche Funktion ausgeführt werden soll, wenn diese Action läuft. Die folgende Zeile erledigt das:

add_action( 'my_hookname', 'my_function' );

Der nächste Schritt ist das Schreiben deiner Funktion. Hier gibt es ein einfaches Beispiel:

function my_function() {
    wp_mail( 'hello@example.com', 'WP Crontrol', 'WP Crontrol rocks!' );
}

Wie erstelle ich ein neues PHP-Cron-Ereignis?

Klicke im Adminbereich unter Werkzeuge → Cron-Ereignisse auf „PHP-Cron-Ereignis hinzufügen“. Gib den Zeitplan und die nächste Ausführungszeit in den Boxen an, die sich in dem dort angezeigten Formular befinden. Der Ereignis-Zeitplan gibt an, wie oft dein Ereignis ausgeführt werden wird. Wenn du kein passendes Intervall siehst, dann füge eins im Adminbereich unter Einstellungen → Cron-Zeitpläne hinzu. Gib den PHP-Code im Bereich „Hook-Code“ ein, den du ausführen willst, wenn dein Cron-Ereignis ausgeführt wird. Du musst keinen öffnenden PHP-Tag (<?php) angeben.

You can read all about the features and security of PHP cron events on the WP Crontrol wiki.

Welche Benutzer können Cron-Ereignisse und -Zeitpläne verwalten?

Nur Benutzer mit der manage_options-Berechtigung können Cron-Ereignisse und -Zeitpläne verwalten. Standardmäßig haben nur Administratoren diese Berechtigung.

Welche Benutzer können PHP-Cron-Ereignisse verwalten? Ist das gefährlich?

Nur Benutzer mit der Berechtigung edit_files können PHP-Cron-Ereignisse verwalten. Das heißt, wenn ein Benutzer keine Dateien im WordPress-Adminbereich bearbeiten darf (d. h. durch den Plugin- oder Theme-Editor), kann er auch keine PHP-Cron-Ereignisse in WP Crontrol hinzufügen, bearbeiten oder löschen. Standardmäßig haben nur Administratoren diese Berechtigung und bei aktiver Multisite haben nur Super-Administratoren diese Berechtigung.

Wenn die Dateibearbeitung über die Konfigurations-Konstanten DISALLOW_FILE_MODS oder DISALLOW_FILE_EDIT deaktiviert wurden, hat kein Benutzer die Berechtigung edit_files, wodurch das Hinzufügen, Bearbeiten oder Löschen eines PHP-Cron-Ereignisses nicht erlaubt ist.

Deshalb ändert sich die erforderliche Berechtigung mit aktiviertem WP Crontrol nicht, um beliebigen PHP-Code auszuführen.

You can read all about the features and security of PHP cron events on the WP Crontrol wiki.

Sind irgendwelche WP-CLI-Befehle verfügbar?

The cron commands which were previously included in WP Crontrol are now part of WP-CLI itself. See wp help cron for more info.

What happens when I deactivate the WP Crontrol plugin?

You can read all about what happens when you deactivate the plugin on the WP Crontrol wiki.

Who took the photo in the plugin header image?

The photo was taken by Michael Pardo and is in the public domain.

Rezensionen

9. März 2024
Use this tool to run my own php script to maintain my uploaded webcam images. Thanks a lot for this plugin.
9. März 2024
Why people are heartless and rate something so good and yet free be given poor rating? These guys have no respect for the opensource and the people who dedicate their time for the great cause. I love your plugin and i can't say enough that its worth 5 stars rating and nothing less. This is the 4th review that i am writing for plugins which are great but some idiots give them poor rating. God bless you guys for sparing your valuable time for those who believe in the Open-source and its spirit of unity from across the world breaking all the barriers. Cheers.
20. November 2023
Thank you a lot, helped me understanding how WP-Cron works. Thanks! 😄
6. November 2023
One of the best plugin to manage and keep track of crons. been using it for years. Thank you!
Alle 149 Rezensionen lesen

Mitwirkende & Entwickler

„WP Crontrol“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„WP Crontrol“ wurde in 18 Sprachen übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „WP Crontrol“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

1.16.1

  • Confirm support for WordPress 6.4

1.16.0

  • 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

  • Pass the $doing_wp_cron value to the cron_request filter so it matches WordPress core
  • Miscellaneous code quality improvements

1.15.2

  • 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

  • Confirms the plugin is compatible with PHP 8.2
  • Increases compatibility with other plugins that include very old Composer autoloader implementations

1.15.0

  • Introduces the ability to pause and resume cron events from the event listing screen; see the FAQ for full details
  • Adds the site time to the cron event editing screen
  • Implements an autoloader to reduce memory usage
  • Bumps the minimum supported version of PHP to 5.6

1.14.0

  • Reverts the changes introduced in version 1.13 while I look into the problem with the deployment process for wordpress.org

1.13.2

  • Fixes another issue with missing files in the release

1.13.1

  • Fixes an issue with missing files in the 1.13.0 release

1.13.0

  • Introduces the ability to pause and resume cron events from the event listing screen; see the FAQ for full details
  • Implements an autoloader to reduce memory usage
  • Bumps the minimum supported version of PHP to 5.6

1.12.1

  • Corrects an issue where an invalid hook callback isn’t always identified
  • Various code quality improvements

1.12.0

  • Fix the PHP cron event management.
  • More „namespacing“ of query variables to avoid conflicts with other cron management plugins.

1.11.0

  • Introduced an Export feature to the event listing screen for exporting the list of events as a CSV file.
  • Added the timezone offset to the date displayed for events that are due to run after the next DST change, for extra clarity.
  • Introduced the crontrol/filter-types and crontrol/filtered-events filters for adjusting the available event filters on the event listing screen.
  • Lots of code quality improvements (thanks, PHPStan!).

1.10.0

  • Support for more granular cron-related error messages in WordPress 5.7
  • Several accessibility improvements
  • Warning for events that are attached to a schedule that is too frequent
  • More clarity around events and schedules that are built in to WordPress core
  • Add a Help tab with links to the wiki and FAQs

1.9.1

  • Fix the adding of new cron events when DISALLOW_FILE_EDIT is true.

1.9.0

  • Add filters and sorting to the event listing screen. Props @yuriipavlov.
  • Replace the „Add New“ tabs with a more standard „Add New“ button on the cron event listing page.
  • Switch back to using browser-native controls for the date and time inputs.
  • Add an error message when trying to edit a non-existent event.
  • Introduce an informational message which appears when there are events that have missed their schedule.
  • Fire actions when cron events and schedules are added, updated, and deleted.

1.8.5

  • Ein Problem mit den Tabs in 1.8.4 wurde behoben.

1.8.4

  • Fügt eine Warnmeldung hinzu, wenn die Standard-Zeitzone geändert wurde. Weitere Informationen (engl.).
  • Es wurde ein Fehler behoben, bei dem eine Zeichenfolge an die Funktion strtotime() übergeben wurde, wenn die Option Jetzt beim Hinzufügen oder Bearbeiten eines Ereignisses ausgewählt wurde.

1.8.3

  • Das Bearbeiten von Ereignissen, die aktuell nicht auf der ersten Seite der Ergebnisse aufgelistet werden, ist korrigiert.

1.8.2

  • Umgeht die Prüfung auf ein identisches Ereignis, wenn es manuell ausgeführt wird. Das erlaubt das manuelle Ausführen eines Ereignisses auch, wenn es innerhalb der nächsten zehn Minuten ausgeführt werden soll oder überfällig ist.
  • Erzwinge das Ausführen nur eines Ereignisses, wenn ein Cron-Event manuell ausgeführt werden soll.
  • Polling der Ereignis-Liste wurde hinzugefügt, um eine Warnung hinzuzufügen, wenn die Ansicht der Ereignis-Liste veraltet ist.
  • Eine Warnung für Cron-Zeitpläne ist hinzugefügt, die kürzer als WP_CRON_LOCK_TIMEOUT sind.
  • Die Prüfung für den Website-Zustand ist zur Liste der persistenten Core-Hooks hinzugefügt.

1.8.1

  • Behebt das untere Massenverarbeitungsmenü in der Ereignis-Listenansicht.
  • Macht die Zeitzone prominenter beim Hinzufügen oder Bearbeiten eines Cron-Ereignisses.

1.8.0

  • Durchsuchen und Seitennummerierung für Cron-Ereignisse
  • Möglichkeit zum Entfernen aller Cron-Ereignisse eines bestimmten Hooks
  • Genauere Antwort-Nachrichten, wenn Ereignisse verwaltet werden (in WordPress 5.1+)
  • Visuelle Warnungen für Ereignisse ohne Actions und PHP-Ereignisse mit Syntax-Fehlern
  • Zeitzonenbezogene Klarstellungen und Korrekturen
  • Eine einheitlichere UI
  • Code-Basis modernisiert

1.7.1

  • Die URL zu PHP.net für die Referenz von strtotime() korrigiert.

1.7.0

  • Entfernt die Eingabefelder für date und time und ersetzt sie mit einigen Vorauswahl-Optionen und einem reinen Textfeld. Korrigiert #24 .
  • Stelle sicher, dass der Zeitplan-Name ist immer korrekt, wenn mehrere Zeitpläne mit demselben Intervall existieren. Fehlerbehandlung hinzugefügt. Korrigiert #25.
  • Die Anzeige der aktuellen Website-Zeit wurde wieder eingeführt.
  • Benutzt einen passenderen HTTP-Antwort-Code für nicht autorisierte Anfrage-Fehler.

1.6.2

  • Entfernt die Möglichkeit, ein PHP-Cron-Ereignis zu löschen, wenn der Benutzer keine Dateien bearbeiten kann.
  • Entfernt den Bearbeiten-Link für PHP-Cron-Ereignisse, wenn der Benutzer das Ereignis nicht bearbeiten kann.
  • Verhindere einen PHP-Hinweis aufgrund einer undefinierten Variable beim Hinzufügen eines neuen Cron-Ereignisses.

1.6.1

  • Behebt einen potenziellen fatalen Fehler in der Ansicht der Cron-Ereignis-Liste.

1.6

  • Massenentfernung von Cron-Ereignissen eingeführt. Juhu!
  • Zeigt den Zeitplan-Namen anstatt des Zeitplan-Intervalls neben jedem Ereignis an.
  • Fügt das neue Cor-Ereignis delete_expired_transients zur Liste der Core-Ereignisse hinzu.
  • Verhindere das Entfernen von individuellen Cron-Zeitplänen, wenn diese benutzt werden.
  • Fügt Links zwischen den Ereignissen- und Zeitplan-Admin-Ansichten hinzu.
  • Fügt Syntax-Hervorhebung zum PHP-Code-Editor für PHP-Cron-Ereignisse hinzu.
  • Darstellungskorrekturen für Ereignisse mit vielen oder langen Argumenten.
  • Verbesserungen am Hilfe-Text.
  • Benutzung von create_function() entfernt.
  • Behebt einige Übersetzer-Kommentare, verbessert i18n, verbessert Coding-Standards.

1.5.0

  • Zeige die eingehängten Aktionen für jedes Cron-Ereignis.
  • Zeigt den Entfernen-Link für die im Core integrierten Cron-Ereignisse nicht an, da diese sofort erneut hinzugefügt werden.
  • Erfolgsnachricht nach dem Hinzufügen oder Bearbeiten eines PHP-Cron-Ereignisses korrigiert.
  • Name des Übersetzungsverzeichnis korrigiert.