WP Crontrol

Description

WP Crontrol vous permet de voir et de contrôler ce qui se passe dans le système WP-Cron. Depuis les écrans d’administration, vous pouvez :

  • Voir tous les évènements cron avec leurs arguments, leur récurrence, les fonctions de rappel et la date de leur prochaine échéance.
  • Edit, delete, pause, resume, and immediately run cron events.
  • Ajouter de nouveaux évènements cron.
  • Suppression en masse d’évènements cron.
  • Ajouter et retirer des planifications cron personnalisées.
  • 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.

Utilisation

  1. Allez dans le menu Outils → Évènements Cron pour gérer les évènements cron.
  2. Allez dans le menu Réglages → Fréquences Cron pour gérer les récurrences cron.

Autres extensions

Je maintiens plusieurs autres extensions pour les développeurs. Jetez-y un coup d’œil :

  • Query Monitor est le panneau des outils de développement pour WordPress.
  • User Switching permet de passer instantanément d’un compte à l’autre dans 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.

Captures d’écran

  • Cron events can be modified, deleted, and executed

  • New cron events can be added

  • De nouvelles planifications cron peuvent être ajoutées, offrant aux développeurs/développeuses d’extensions plus d’options lors de la planification d’évènements

    .

FAQ

L’extension fonctionne-t-elle avec PHP 8 ?

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

Je reçois l’erreur « Il y a eu un problème lors du déclenchement d’un appel au système WP-Cron sur votre site. ». Comment puis-je corriger ce problème ?

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

Pourquoi certains évènements cron manquent-ils leur planification ?

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

Pourquoi certains évènements cron réapparaissent-ils peu après leur suppression ?

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.

Est-il possible de supprimer les évènements cron en toute sécurité ?

Cela dépend entièrement de l’évènement. Vous pouvez utiliser votre moteur de recherche préféré pour rechercher le nom de l’évènement afin de trouver à quelle extension il appartient, et décider ensuite de le supprimer ou non.

Si l’évènement affiche « Aucune » comme action, il est généralement sans risque de le supprimer. Veuillez consulter les autres FAQ pour plus d’informations sur les évènements sans action.

Pourquoi ne puis-je pas supprimer certains évènements cron ?

Le cœur WordPress utilise des évènements cron pour certaines de ses fonctionnalités. La suppression de ces évènements n’est pas possible, car WordPress les re-planifierait immédiatement si vous les supprimiez. Pour cette raison, WP Crontrol ne vous permet pas de supprimer ces évènements persistants du cœur de WordPress.

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.

Que signifie « Aucune » pour l’action d’un évènement cron ?

Cela signifie que l’évènement cron est programmé pour s’exécuter à l’heure spécifiée, mais qu’aucune fonction ne sera déclenchée lorsque l’évènement s’exécutera, ce qui rend l’évènement inutile.

Ce problème est souvent causé par des extensions qui ne nettoient pas leurs évènements cron lorsqu’ils sont désactivés. Vous pouvez utiliser votre moteur de recherche préféré pour rechercher le nom de l’évènement afin de savoir à quelle extension il appartient, et décider ensuite de le supprimer ou non.

Comment modifier la prochaine heure d’exécution ou la récurrence d’un évènement cron ?

Vous pouvez modifier l’heure et la récurrence d’un évènement cron en cliquant sur le lien « Éditer » à côté de l’évènement.

Comment puis-je créer un évènement cron qui sollicite une URL ?

À partir de l’écran Outils → Évènements cron → Ajouter, créez un évènement cron PHP qui inclut le PHP qui récupère l’URL à l’aide de l’API HTTP de WordPress. Par exemple :

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

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

Pourquoi les modifications que j’apporte à certains évènements cron ne sont-ils pas enregistrées ?

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

Puis-je exporter une liste d’évènements cron ?

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.

Puis-je voir le journal des évènements cron qui ont été exécutés sur mon site ?

Pas encore, mais j’espère ajouter cette fonctionnalité bientôt.

Puis-je voir le journal des modifications, ajouts et suppressions d’évènements et planifications cron ?

Oui. L’excellente extension Simple History dispose d’un support intégré pour la journalisation des actions effectuées via WP Crontrol.

À quoi sert d’ajouter de nouvelles fréquences cron ?

Les fréquences Cron sont utilisés par WordPress et les extensions pour planifier des évènements à exécuter à intervalles réguliers. Les intervalles doivent être fournis par le cœur de WordPress ou par une extension pour pouvoir être utilisées. Par exemple, de nombreuses extensions de sauvegarde prennent en charge les sauvegardes récurrentes. Pour effectuer une sauvegarde hebdomadaire, une fréquence cron hebdomadaire doit d’abord être saisie dans WP Crontrol, une extension de sauvegarde peut alors l’utiliser comme fréquence d’exécution.

Comment créer un nouvel évènement cron ?

Il y a deux étapes pour obtenir un évènement cron fonctionnel qui s’exécute régulièrement. La première étape consiste à informer WordPress de l’existence du crochet. C’est l’élément que WP Crontrol a créé pour le déclenchement. La deuxième étape consiste à appeler une fonction lorsque votre crochet est exécuté.

Première étape : ajout du crochet

Dans le panneau d’administration Outils → Évènements Cron, cliquez sur « Ajouter » et saisissez les détails du crochet. Il est préférable d’utiliser un nom de crochet conforme aux conventions de nommage des variables PHP. La récurrence correspond à la fréquence à laquelle votre crochet sera exécuté. Si vous ne voyez pas une bonne fréquence, ajoutez-en une dans Réglages → Fréquences Cron.

Deuxième étape : écrire la fonction

Cette partie se déroule dans le code PHP (par exemple, dans le fichier functions.php de votre thème). Pour exécuter votre crochet, WordPress exécute une action. C’est pourquoi, nous devons indiquer à WordPress quelle fonction doit être exécutée lorsque cette action est exécutée. La ligne suivante accomplit cela :

add_action( 'my_hookname', 'my_function' );

L’étape suivante consiste à écrire la fonction. Voici un exemple simple :

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

Comment créer un nouvel évènement cron PHP ?

Dans le panneau d’administration Outils → Évènements Cron, cliquez sur « Ajouter » et saisissez les détails de l’évènement. sous le tableau des évènements. Dans le formulaire qui apparaît, entrez la récurrence et la prochaine heure d’exécution dans les champs prévus à cet effet. La récurrence définit tous les combien de temps votre crochet sera exécuté. Si vous ne voyez pas d’intervalle qui convienne, ajoutez-en un nouveau dans Réglages → Fréquences Cron. Dans le champs « Code du crochet », entrez le code PHP qui doit être exécuté lorsque l’évènement cron est lancé. Il n’est pas nécessaire d’inclure les balises d’ouverture PHP (<?php).

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

Quels comptes peuvent gérer les évènements et les planifications cron ?

Uniquement les comptes disposant de la capacité manage_options peuvent gérer les évènements et les fréquences Cron. Par défaut, uniquement les administrateurs/administratrices disposent de cette capacité.

Quels comptes peuvent gérer les évènements cron de PHP ? Est-ce dangereux ?

Seuls les comptes ayant la capacité edit_files peuvent gérer les évènements PHP cron. Cela signifie que si un utilisateur ne peut modifier les fichiers sur le site (par exemple, via l’éditeur d’extensions ou l’éditeur de thèmes), il ne peut modifier ou ajouter un évènement PHP cron. Par défaut, seuls les administrateurs ont cette capacité, et avec l’option Multisite activée, seuls les super-administrateurs/administratrices ont cette capacité.

Si l’édition de fichiers a été désactivée via les constantes de configuration DISALLOW_FILE_MODS ou DISALLOW_FILE_EDIT, alors aucun compte n’aura la capacité edit_files ce qui signifie que la modification ou l’ajout d’un évènement cron PHP ne sera pas autorisé.

Par conséquent, le niveau d’accès du compte requis pour exécuter un code PHP arbitraire ne change pas avec WP Crontrol activé.

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

Des commandes WP-CLI sont-elles disponibles ?

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.

Qui a pris la photo de l’image d’en-tête de l’extension ?

La photo a été prise par Michael Pardo. Elle est dans le domaine public.

Avis

26 mai 2023 1 réponse
I have finished the Korean translation.I just want to say thank you for developing such a good plugin.And I hope it will be translated into more languages so that many WordPress users can use it conveniently. WP Crontrol 한국어 번역을 모두 마쳤습니다.좋은 플러그인을 개발해 주어서 고맙다는 인사를 전하고 싶습니다.그리고 보다 많은 언어로 번역되어 많은 워드프레스 사용자들이 편리하게 사용할 수 있기를 바랍니다.
10 janvier 2023 2 réponses
With WordPress  6.1.1 this plugin no longer does anything. I could not delete any events
30 décembre 2022
The plugin works well. I found a couple legacy cron jobs and deleted them. Also can reschedule the events which is very helpful.
26 septembre 2022
Ein super Plugin, dass die Cron Jobs übersichtlich auflistet.
Lire les 141 avis

Contributeurs/contributrices & développeurs/développeuses

« WP Crontrol » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.

Contributeurs

“WP Crontrol” a été traduit dans 18 locales. Remerciez l’équipe de traduction pour ses contributions.

Traduisez « WP Crontrol » dans votre langue.

Le développement vous intéresse ?

Parcourir le code, consulter le SVN dépôt, ou s’inscrire au journal de développement par RSS.

Journal

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

  • Fix an issue with the tabs in 1.8.4.

1.8.4

  • Add a warning message if the default timezone has been changed. More information.
  • Fixed string being passed to strtotime() function when the Now option is chosen when adding or editing an event.

1.8.3

  • Fix the editing of events that aren’t currently listed on the first page of results.

1.8.2

  • Contourner le contrôle des évènements en double lors de l’exécution manuelle d’un évènement. Cela permet d’exécuter manuellement un évènement même s’il doit être exécuté dans les dix minutes ou s’il est en retard.
  • Force only one event to fire when manually running a cron event.
  • Introduce polling of the events list in order to show a warning when the event listing screen is out of date.
  • Add a warning for cron schedules which are shorter than WP_CRON_LOCK_TIMEOUT.
  • Add the Site Health check event to the list of persistent core hooks.

1.8.1

  • Fix the bottom bulk action menu on the event listing screen.
  • Make the timezone more prominent when adding or editing a cron event.

1.8.0

  • Searching and pagination for cron events
  • Ability to delete all cron events with a given hook
  • More accurate response messages when managing events (in WordPress 5.1+)
  • Visual warnings for events without actions, and PHP events with syntax errors
  • Timezone-related clarifications and fixes
  • A more unified UI
  • Modernised codebase

1.7.1

  • Correct the PHP.net URL for the strtotime() reference.

1.7.0

  • Remove the date and time inputs and replace with a couple of preset options and a plain text field. Fixes #24 .
  • Ensure the schedule name is always correct when multiple schedules exist with the same interval. Add error handling. Fixes #25.
  • Re-introduce the display of the current site time.
  • Use a more appropriate HTTP response code for unauthorised request errors.

1.6.2

  • Remove the ability to delete a PHP cron event if the user cannot edit files.
  • Remove the Edit link for PHP cron events when the user cannot edit the event.
  • Avoid a PHP notice due to an undefined variable when adding a new cron event.

1.6.1

  • Fix a potential fatal error on the cron events listing screen.

1.6

  • Introduce bulk deletion of cron events. Yay!
  • Show the schedule name instead of the schedule interval next to each event.
  • Add core’s new delete_expired_transients event to the list of core events.
  • Don’t allow custom cron schedules to be deleted if they’re in use.
  • Add links between the Events and Schedules admin screens.
  • Add syntax highlighting to the PHP code editor for a PHP cron event.
  • Styling fixes for events with many arguments or long arguments.
  • Improvements to help text.
  • Remove usage of create_function().
  • Fix some translator comments, improve i18n, improve coding standards.

1.5.0

  • Show the hooked actions for each cron event.
  • Don’t show the Delete link for core’s built-in cron events, as they get re-populated immediately.
  • Correct the success message after adding or editing PHP cron events.
  • Correct the translations directory name.

1.4

  • Switch to requiring cron event times to be input using the site’s local timezone instead of UTC.
  • Add the ability for a PHP cron event to be given an optional display name.
  • Better UX for users who cannot edit files and therefore cannot add or edit PHP cron events.
  • Terminology and i18n improvements.

1.3.1

  • Display a less scary looking message when DISABLE_WP_CRON is defined.
  • Correct the example code for cron event arguments.

1.3

  • Improvements to the UI.
  • More error detection when testing WP-Cron functionality.
  • Improve the capability checks for single site and multisite.
  • Lots of escaping and sanitising.
  • Fix various issues with multiple events with the same hook name.
  • Removed the WP-CLI commands, as these have now been added to WP-CLI core (see wp help cron for more info)