WP Crontrol

Descrizione

WP Crontrol enables you to take control of the cron events on your WordPress website. From the admin screens you can:

  • Visualizza tutti gli eventi cron con i loro argomenti, la ricorrenza, le funzioni di callback e la prossima scadenza.
  • Edit, delete, pause, resume, and immediately run cron events.
  • Aggiungi nuovi eventi cron.
  • Elimina in massa gli eventi cron.
  • Aggiungi e rimuovi pianificazioni cron personalizzate.
  • 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.

Utilizzo

  1. Vai al menu Strumenti → Eventi cron per gestire gli eventi cron.
  2. Vai al menu Impostazioni → Pianificazioni cron per gestire le pianificazioni cron.

Altri plugin

Gestisco molti altri plugin per gli sviluppatori. Dai un’occhiata a questi:

  • Query Monitor è il pannello degli strumenti per sviluppatori di WordPress.
  • User Switching permette di passare istantaneamente da un account utente all’altro in WordPress.

Informativa sulla privacy

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.

Informativa sull’accessibilità

WP Crontrol aims to be fully accessible to all of its users. WP Crontrol’s full accessibility statement can be found here.

Screenshot

  • Gli eventi cron possono essere modificati, cancellati ed eseguiti

  • Si possono aggiungere nuovi eventi cron

  • È possibile aggiungere nuove pianificazioni cron, dando agli sviluppatori di plugin più opzioni nella programmazione degli eventi

FAQ

Questo plugin funziona con PHP 8?

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

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 website.

Why do some cron events miss their schedule?

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

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.

È sicuro cancellare gli eventi cron?

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.

Perché non riesco a cancellare alcuni eventi cron?

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.

Cosa succede quando riprendo un evento?

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.

How can I create a cron event that requests a URL?

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 website.

Why do changes that I make to some cron events not get saved?

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

Posso esportare un elenco di eventi 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.

Can I see a historical log of all the cron events that ran on my site?

Non ancora, ma spero di aggiungere presto questa funzionalità.

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.

A cosa serve aggiungere nuove pianificazioni cron?

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.

Come faccio a creare un nuovo evento cron?

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.

Fase uno: aggiungere l’hook

In the Tools → Cron Events admin panel, click on “Add New” and enter the details of the hook. You’re best off using a hook name 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' );

Il passo successivo è scrivere la tua funzione. Ecco un semplice esempio:

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

Come faccio a creare un nuovo evento cron di PHP?

In the Tools → Cron Events admin panel, click on “Add New”. In the form that appears, select “PHP Cron Event” and enter the schedule and next run time. 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 “PHP 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).

Creating, editing, and running PHP cron events is subject to restrictive security permissions. You can read all about the features and security of PHP cron events on the WP Crontrol website.

Quali utenti possono gestire gli eventi cron e le pianificazioni?

Only users with the manage_options capability can manage cron events and schedules. By default, only Administrators have this capability.

Which users can manage PHP cron events? Is this dangerous?

Only users with the edit_files capability can manage PHP cron events. This means if a user cannot edit files via the WordPress admin area (i.e. through the Plugin Editor or Theme Editor) then they also cannot add, edit, or delete a PHP cron event in WP Crontrol. By default only Administrators have this capability, and with Multisite enabled only Super Admins have this capability.

If file editing has been disabled via the DISALLOW_FILE_MODS or DISALLOW_FILE_EDIT configuration constants then no user will have the edit_files capability, which means adding, editing, or deleting a PHP cron event will not be permitted.

Pertanto, il livello di accesso dell’utente necessario per eseguire codice PHP arbitrario non cambia con WP Crontrol attivato.

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

Sono disponibili dei comandi WP-CLI?

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 website.

Come posso segnalare un bug di sicurezza?

You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team helps validate, triage, and handle any security vulnerabilities. Report a security vulnerability here.

Who took the photo in the plugin header image?

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

Recensioni

9 Marzo 2024
Use this tool to run my own php script to maintain my uploaded webcam images. Thanks a lot for this plugin.
9 Marzo 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 Novembre 2023
Thank you a lot, helped me understanding how WP-Cron works. Thanks! 😄
6 Novembre 2023
One of the best plugin to manage and keep track of crons. been using it for years. Thank you!
Leggi tutte le recensioni di 149

Contributi e sviluppo

“WP Crontrol” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

“WP Crontrol” è stato tradotto in 18 lingue. Grazie ai traduttori per i loro contributi.

Traduci “WP Crontrol” nella tua lingua.

Ti interessa lo sviluppo?

Esplora il codice segui il repository SVN, segui il log delle modifiche tramite RSS.

Changelog (registro delle modifiche)

1.16.3

  • Corrects the displayed PHP cron event name if one is provided

1.16.2

1.16.1

  • È stato confermato il supporto a 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
  • Scartata la richiesta Ajax che controlla se la pagina corrente degli eventi cron è cambiata dal caricamento
  • Apportati alcuni miglioramenti all’ordinamento delle colonne della tabella dell’elenco degli eventi cron
  • Aumentata la versione minima supportata di PHP alla versione 7.4

1.15.3

  • Pass the $doing_wp_cron value to the cron_request filter so it matches WordPress core
  • Miglioramenti vari alla qualità del codice

1.15.2

  • Migliorata la terminologia relativa alla pausa ed all’eliminazione degli hook e degli eventi
  • Migliorata l’accessibilità della tabella degli eventi per gli utenti con tastiera
  • Removes an unnecessary SQL query when fetching the list of paused events
  • Adds an FAQ about deactivating the plugin

1.15.1

  • È confermato che il plugin è compatibile con PHP 8.2
  • Aumentata la compatibilità con altri plugin che includono implementazioni di caricamento automatico di Composer molto vecchie

1.15.0

  • Introduce la possibilità di mettere in pausa e riprendere gli eventi cron dalla schermata dell’elenco degli eventi; consulta le FAQ per tutti i dettagli.
  • Aggiunto l’orario del sito web alla schermata di modifica dell’evento cron.
  • Implementa un caricamento automatico per ridurre l’utilizzo della memoria
  • Porta la versione minima supportata di PHP alla versione 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

  • Corretti altri problemi con i file mancanti nella versione

1.13.1

  • Corregge un problema di file mancanti nella versione 1.13.0

1.13.0

  • Introduce la possibilità di mettere in pausa e riprendere gli eventi cron dalla schermata dell’elenco degli eventi; consulta le FAQ per tutti i dettagli.
  • Implementa un caricamento automatico per ridurre l’utilizzo della memoria
  • Porta la versione minima supportata di PHP alla versione 5.6

1.12.1

  • Corregge un problema per cui un callback dell’hook non valido non viene sempre identificato
  • Vari miglioramenti alla qualità del codice

1.12.0

  • Corretta la gestione degli eventi cron di PHP.
  • Maggiore “namespacing” delle variabili di query per evitare conflitti con altri plugin di gestione cron.

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.
  • Tanti miglioramenti alla qualità del codice (grazie, PHPStan!).

1.10.0

  • Supporto per messaggi di errore più granulari relativi al cron in WordPress 5.7
  • Diversi miglioramenti dell’accessibilità
  • Warning for events that are attached to a schedule that is too frequent
  • Maggiore chiarezza sugli eventi e sugli orari che sono integrati nel core di WordPress
  • Add a Help tab with links to the wiki and FAQs

1.9.1

  • Corregge l’aggiunta di nuovi eventi cron quando DISALLOW_FILE_EDIT è vero.

1.9.0

  • Aggiunti i filtri e l’ordinamento alla schermata dell’elenco degli eventi. Grazie a @yuriipavlov.
  • Sostituire le schede “Aggiungi nuovo” con un pulsante standard “Aggiungi nuovo” nella pagina di elenco degli eventi cron.
  • Torna ad utilizzare i controlli nativi del browser per l’inserimento della data e dell’ora.
  • Aggiungi un messaggio di errore quando si cerca di modificare un evento inesistente.
  • Introdotto un messaggio informativo che appare quando ci sono eventi che non sono stati programmati.
  • Esegui azioni quando gli eventi cron e le pianificazioni vengono aggiunti, aggiornati e cancellati.

1.8.5

  • Corretto un problema con le schede nella versione 1.8.4.

1.8.4

  • Add a warning message if the default timezone has been changed. More information.
  • Corretta la stringa che viene passata alla funzione strtotime() quando viene scelta l’opzione Adesso quando si aggiunge o si modifica un evento.

1.8.3

  • Corretta la modifica degli eventi che non sono attualmente elencati nella prima pagina dei risultati.

1.8.2

  • Esclude il controllo degli eventi duplicati quando si esegue manualmente un evento. Questo permette di eseguire manualmente un evento anche se la scadenza è entro dieci minuti o se è in ritardo.
  • Forza l’attivazione di un solo evento quando si esegue manualmente un evento cron.
  • Introduce polling of the events list in order to show a warning when the event listing screen is out of date.
  • Aggiunto un avviso per le pianificazioni cron che sono più brevi di WP_CRON_LOCK_TIMEOUT.
  • Aggiunto l’evento Site Health check all’elenco degli hook persistenti del core.

1.8.1

  • Fix the bottom bulk action menu on the event listing screen.
  • Rendere più evidente il fuso orario quando si aggiunge o si modifica un evento cron.

1.8.0

  • Ricerca e paginazione per gli eventi cron
  • Possibilità di cancellare tutti gli eventi cron con un determinato hook
  • Messaggi di risposta più precisi nella gestione degli eventi (in WordPress 5.1+)
  • Avvisi visivi per gli eventi senza azioni e per gli eventi PHP con errori di sintassi.
  • Chiarimenti e correzioni relative al fuso orario
  • Un’interfaccia utente più unificata
  • Base del codice modernizzata

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.
  • Evita un avviso di PHP dovuto ad una variabile non definita quando si aggiunge un nuovo evento cron.

1.6.1

  • Correzione di un potenziale errore irreversibile nella schermata di elencazione degli eventi cron.

1.6

  • Introduzione della cancellazione di massa degli eventi cron. Evviva!
  • Mostra il nome del programma invece dell’intervallo di tempo accanto ad ogni evento.
  • Aggiunto il nuovo evento delete_expired_transients di Core all’elenco degli eventi di Core.
  • Non permette che le pianificazioni cron personalizzate vengano cancellate se sono in uso.
  • Aggiunti i collegamenti tra le schermate di amministrazione degli Eventi e degli Orari.
  • Aggiunta l’evidenziazione della sintassi all’editor del codice PHP per un evento cron PHP.
  • Correzioni di stile per gli eventi con molti argomenti o argomenti lunghi.
  • Miglioramenti al testo di aiuto.
  • Rimosso l’uso di create_function().
  • Corretti alcuni commenti dei traduttori, migliorato l’i18n, migliorati gli standard di codifica.

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.