1. Documentation /
  2. AutomateWoo /
  3. Replace WP Cron with a real Cron job

Replace WP Cron with a real Cron job

Note: This is a Developer level doc. If you are unfamiliar with code/templates, resolving potential conflicts, or custom cron jobs, seek assistance from a qualified WordPress/WooCommerce Developer. We highly recommend Codeable, or a Certified WooExpert. We are unable to provide support for customizations under our Support Policy.

Replacing the standard WP Cron system with a real Cron job on your server can improve the stability and performance of your site. AutomateWoo especially benefits from this since it uses Cron heavily and runs many tasks asynchronously in order to avoid slowing down requests to your site.

Read more about Hooking WP-Cron Into the System Task Scheduler from the WordPress developer documentation.

When using AutomateWoo we recommend setting the Cron interval time to no greater than 5 minutes. That is */5 * * * * for the Cron interval setting.

The command you should use is wget -q -O - http://YOUR_SITE_URL/wp-cron.php >/dev/null 2>&1

After setting up the server Cron job you should disable the normal WP Cron request by adding the following line to you wp-config.php file: define('DISABLE_WP_CRON', true);