Connect with us

core

Which WordPress Cron Events Should You Modify

Published

on

Which WordPress Cron Events Should You Modify


WordPress has WP-Cron which is a built-in system used for scheduling time-based tasks. WordPress core adds a number of default cron events and those can easily be modified using a plugin such as WP Crontrol.

After you have installed and activated the plugin it will add sub-menu items to;

Tools > Cron Events

To view, all WordPress core events go to the middle section which will show all of those. Two cron events that are worth modifying would be;

delete_expired_transients

The delete expired transients cron event normally runs daily to delete transients in the options database table that have expired this cron event can be modified to run twice daily.

Manage all your WordPress sites with the MainWP Dashboard

WordPress Management for Professionals

All MainWP Pro Extensions are available through one of our convenient bundled packages.

wp_https_detection

HTTPS detection was added into WordPress 5.7 if the site’s database is already HTTPS then this cron event can be modified to run every week.

It is worth checking out if there are any cron events without actions on your site. These would be cron events leftover after plugins have been deactivated or deleted from the site. if you can confirm that those cron events no longer need to be run on the site you can delete them.

Current cron events that are being run on the site that was created by the currently installed and activated plugin can be found in custom events in the Cron Events section in wp-admin on the site. Check to see if any of the current cron events look like they are being run too frequently on the site since cron events can cause performance issues if you have a number all running on your site at the same time.

Keeping a check on the active cron events from WordPress core and active plugins on your site will help you keep track of what is being run on your site and to make sure your site does not run into performance issues being caused by active cron events.



Source link

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *