If you are working with WordPress cron job, you need to understand it is not a guaranteed timing mechanism. Wp-cron fires based on site activity. If you have a job set to fire every ten minutes, but nobody visits your site for an hour, then the job doesn’t fire for an hour. As a solution to this, we can either use server cron or resolve the issue using the following methods.
- Via wp-config.php
- Via cPanel
- 3rd Party Cron Job Set Up
Method 1: Via wp-config.php
If you have a lesser number of visits per day and you are using wp-cron to do some scheduled tasks, you can add below line in your wp-config.php to fire Cron.
define('ALTERNATE_WP_CRON', true);
This method uses a redirection approach, which makes the user’s browser get a redirect when the cron needs to run so that they come back to the site immediately while cron continues to run in the connection they just dropped.
Method 2: Via cPanel
You can set Cron Job with help of your hosting providers cPanel tool as shown below:
Alternate Options – 3rd Party Cron Job Set Up
If you find WordPress Cron is not efficient enough, there are 3rd Party options available that will take care of setting up a Cron job as per your business case. EasyCron is one of the easiest options available.
Darien Hage
August 24, 2023
The Server Cron is ‘Running’ with Easy Cron set to every minute, but the feed never is ‘Finished’ because the cron runs again cause the feed to start regenerating again. Causing the XML to have errors. when FB or Google poll the XML file it has upload errors due to the the feed constantly ‘Running’ and never sitting on finished.
Same occurs with a WordPress cron set to run every 20 minutes
Vineetha
September 1, 2023
Hi Darien Hage,
Thanks for reaching out! We have fixed the issue in the latest release. Please ensure you are using version 1.0.6 of the plugin WebToffee WooCommerce Product Feed & Sync Manager.
A N JANI
February 26, 2021
Both WordPress Cron and Server Cron mechanisms giving an Error with no context of where I’m not getting it right
Alan
March 16, 2021
Hi,
Please reach us via support and share the screenshot of the issue you are facing. We will follow you up from there.