Using the Product Feed Manager for WooCommerce plugin you only get 4 options while scheduling your feed.
- No Interval – Your feed won’t be generated automatically, you will have to update the feed manually to include all the recently added products.
- Hourly – This option will generate the feed every hour starting from the feed publishing time.
- Daily – This option will generate the feed every day at the same time.
- Weekly – This option will generate the feed every week at the same time.
However, you cannot set the feed generation to auto-generate every 5 minutes.
We haven’t provided this option as the feed generation process always puts extra pressure on your server, and if you schedule your feed to be generated every 5 minutes, it will definitely add some extra pressure.
Also, sometimes depending on your product count, it may take a while to generate all the products, it may take even 5-10-15 minutes to generate all the products, so in this case if you schedule your feed to generate every 5 minutes, even your server could go down.
However, there are some merchants that accept/ require 5 minutes feed interval – so in such cases, you may need to use a custom feed schedule option to set the 5 minutes feed interval which you can’t do with the Product Feed Manager plugin.
But you must check how many products are you going to generate and how much time is taking to generate all the products, you can take the next step according to this.
In this guide, I will show you how you can set a custom feed refresh interval with WP Crontrol.
Step 1: Install WP Crontrol #
1. Go to your WordPress Dashboard, and click or hover your mouse on the Plugins menu option from the WordPress dashboard on the left.
Click on the Add New option, and it will take you to the Add Plugins page.
2. Type WP Crontrol on the plugin search box, and you will get WP Crontrol on the search result.
Click on the Install button first and then once the plugin is installed, then click on the Activate button and the WP Crontrol plugin will be installed on your site.
Step 2: Edit Cron Event #
1. Go to your WordPress Dashboard, and click or hover your mouse on the Tools menu option from the WordPress dashboard on the left.
Click on the Cron Events option, and you will see all the active Cron Events list.
2. Here, search for the “rex_feed” and you will find the following options depending on the feed schedule:
- rex_feed_schedule_update – this will appear if you’ve setup an hourly feed schedule
- rex_feed_daily_update – this will appear if you’ve setup a daily feed schedule
- rex_feed_weekly_update – this will appear if you’ve setup a weekly feed schedule
3. Now say, you have an hourly feed, but you want to change it to 5 minutes feed refresh interval.
Hover on the rex_feed_schedule_update event, and you will see some new options.
Click on the Edit Now option.
4. It will take you to the Event settings page.
Here, you will see that Hook Name is already given.
Set the following settings:
Next Run: Now
Recurrence: Every 5 Minutes (wp_rex_product_feed_database_update_cron_interval)
Once you’ve entered the settings, click on the Update Event button.
From now on, all of your Hourly feeds will be generated every 5 minutes.
5. If you want to change the Daily or Weekly cron settings, the arguments would be:
[Event] rex_feed_daily_update – Rex_Product_Feed_Admin->activate_daily_update()
[Event] rex_feed_weekly_update – Rex_Product_Feed_Admin->activate_weekly_update()
That’s it, your feed refresher interval is changed now.
You can set this to:
- Every Minute
- Every 5 Minutes
- Once Hourly
- Twice Daily
- One Daily
- Once Weekly
- Every 15 Days
Just remember that changing the Hourly, Daily, or Weekly events will affect all the feeds set to follow this refresh time interval.