Scheduled tasks with the WordPress Cron –

Hosting Mautic QuickStart -50% with support in Spanish
24 hours and free training

Send up to 1,000,000 emails/year. Mautic support in Spanish 24 hours, 365 days

includes as part of its core the task scheduling functionality, either single execution or in intervals.

For example, when you schedule an entry to be published on a certain date and time, you are making use of one of its features.

Just as WordPress has a series of scheduled tasks for internal system management, plugins can also make use of this functionality and schedule their own Cron tasks.

In this article you will learn how to view and manage all tasks that you have programmed in the Cron of your WordPress website.

In current versions WordPress does not have a default option to view and manage cron tasks, however we can install a plugin that provides us with this functionality.

Plugin to manage WordPress Cron tasks

There are several plugins to manage tasks WordPress Chronicleshowever the one we will use will be , which is one of the most popular.

After installing and activating the plugin we will see that we have a new menu option under the Tools menu called Cron Events, another menu option is also created under Settings, called Cron Schedules.

WordPress Cron Event Listing

From the option of chron events you can see all the cron events you have scheduled on your website.

The main columns of this list are:

  • Hook: Refers to the one with which it has been programmed. That is, each event is associated with a Hook, and a function is associated with this Hook to execute code.
  • next run: Shows the date and time of the next execution of the Hook.
  • Action: It refers to the function that is associated to the Hook and that is the one that will execute actions through code.
  • recurrence: Shows the time interval in which the event is executed.
See also  Install and configure Redsys in WooCommerce -

When you pass the mouse over any of these items in the event list you will see that you have additional options.

One of the most important is run nowwith this you will force the execution of the event, however it will not cause the next execution to vary.

Equally you can edit the eventchanging the date and time of programming, which I do not recommend and you can also delete it.

If you remove events from plugins that are active they may be generated again, same for WordPress cron events.

Deleting Unused WordPress Cron Events

We had seen that it is possible to delete cron events, however how to identify which events are not being used?.

Fortunately the plugin allows you to see which events have no actionas can be seen in the following screen:

You can also list all events without any action from the link: Events without any action.

Events without any action are usually events created by plugins that you have disabled or uninstalled and yet their created events still remain.

In the previous image we see two Hooks that refer to WooCommerce, however in the example site that plugin has been uninstalled.

If you want to further optimize the cron event functionality, I suggest you also review the article:

List of WordPress Cron Schedules

The list of cron schedules refers to the intervals that you have created, for example: daily, weekly, twice a day, etc.

Some of these come by default with WordPress itself, others can be created by plugins.

See also  International SEO, everything you should know! -

Normally you will not need to add new schedules on this screen as if a plugin needs a certain interval it will usually allow you to create it through the plugin settings itself.

conclusion

As we have been able to verify, despite the WordPress Cron functionality not having configuration screens that come by default in the system, you can use a plugin to manage this functionality.

The WP-Control plugin mainly allows you to view, delete and force the execution of cron events that you have created on your WordPress website.

Help us improve our content by sharing your opinion

WordPress technical support at and regular speaker at Meetups and WordCamps in America.

Loading Facebook Comments ...
Loading Disqus Comments ...