Open navigation

Setup External Cron Job

For sites using Magento Klevu module versions 3.x or 2.x, refer to this article. 

In version 4.x, sync cron tasks use the dedicated klevu cron group for easier scheduling and configuration. We recommend using Magento’s native cron for running these tasks instead of a custom server-side cron setup.

We have consolidated our instructions for configuring Klevu data synchronization with Magento 2. Please click here for the most up to date instructions: Magento 2 Data Sync Overview

In case of larger product catalogs, from lots of processes relying on Magento cron, sometimes klevu cron keeps on running all the time or will be in a queue because of other module crons.  To avoid this, as an alternative, one can setup an external shell script that runs independently of Magento cron. Follow the steps below to setup external script in Magento 2:

  1. Login into Magento Admin Panel.
  2. Please setup the below command to execute as an independent CRON Job every 30 minutes.
    php bin/magento klevu:syncdata --updatesonly
    Note:Please note, when the product sync is running, Klevu Magento 2 plugin creates a temporary lock file inside <magento-root-folder>/ var folder to avoid executing multiple copies of Klevu's product sync at the same time. Please make sure that the folder has enough permission to create the file.
  3. Go to StoresConfiguration. Open Search Configuration under Klevu
  4. Select option  Never  for Frequency under  Data sync settings  (the option is visible at default config level)
  5. Click on Save Config.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.