In this tutorial we will show you how to automate the process of WooCommerce product import with excel by scheduling a cron job.

Apart from perfoming a product import manually by uploading the excel file and mapping the fields in our plugin import screen , you can schedule the import instead , by using Cron Job * and run the import process in specific time intervals or even run the process once in the background.

Scheduling an automated WooCommerce Product Import can be used mainly for 2 main reasons:

  1. Creating a large number of new WooCommerce Products, a process that will be time consuming and you would choose to do it in the background
  2. Updating existing Products. Most Eshops will need a way to update more ofter products stock values from remote location , possibly whether you are selling on retail or in other ways apart from your eshop and you need to update products stock quantities or prices in bulk by just updating an excel file without every time updating products one by one.
product import cron-job-scheduler

Step 1) Import / Update Products from an excel ( xlsx file ) in a remote url location

In order to automate the process of import , you will create an excel file and upload it in a url Location publicly accessible.

This may be a directory on your website server , for example https://yourwebsite.com/testfile.xlsx

Once this done you are ready to move one to the next step which is saving mapping preferences of  your excel fields to the product fields.

In the last step you will also add the xlsx URL to the scheduling settings page.

 

Step 2) Setup the importing product mapping template

In order to properly import the product along with the fields, taxonomies , custom fields , you will have to predefine the mapping of those excel columns to the product fields in WooCommerce.

For this you have 2 options:

  1. Go to the plugin’s settings page / tab: Product Import Template

This screen will detect All WooCommerce product fields and taxonomies along with any custom fields from other plugins for the products.

Here you need define for each field the Excel Column letter.

Moreover there are some extra settings such as Update Only which you can define and control what the import will do.

woocommerce-product-import-schedule-template

Once done, press Save changes and you are ready to proceed to the next step which is the setup of Cron schedule.

 

  1. During a manual import via Product Import screen and while mapping excel fields to product fields , just before hitting the start button ,you can select the option Save Mapping for later use.

schedule-product-import-mapping-save-preferences

This option will create a template which you can double check in Settings / Product Imports template.

Setup Cron Job – Schedule Product Import settings

This is the final step where once configured , import process may start.

Go to WooCommerce product import with excel settings page and then to Products Import Schedule tab.

product-import-cron-job-schedule

Here you need to fill the details below:

  • • Select whether you need to schedule – either Yes or No
  • • Next option is to choose between a
    • One time product import or
    • Recurrent product import / updates which will happened in specific time intervals defined later.
  • • Next option is to define the Products Import Excel URL location ( see step 1) .
  • • Next are Import schedule date and time that will define when import should start , whether it is a One Time schedule or a Recurrent on specific intervals
  • • If you have chosen recurrent import a new field will be revealed : Products Import Schedule Frequency.

Here you can choose between

  • • 1 minute
  • • 30 minutes
  • • 1 hour
  • • 6 hours
  • • 12 hours
  • • Daily
  • • Weekly
  • • Monthly

These options will define how often the automated schedule of WooCommerce Product import or Update will be running.

Lastly and whether you wish to use it, is to enter an email address under the field Email info when cron finished . Once the scheduled imports of excel are running and finish , you will be receiving a confirmation email.

Using our automated scheduling process of WooCommerce Product Import or Update , the process will run in the background saving you time .

 

* Cron is a time-based job scheduler ,  suitable for scheduling one time or repetitive tasks.

back to Tutorials

CHECK ALL OUR PLUGINS