Cron - Quick Reference
Klevu adds multiple cron jobs to manage the registration of attributes and the indexing of entity data.
All cron tasks added by version 4.x of the Klevu integration use the dedicated klevu cron group, allowing granular configuration of scheduling and run options.
We recommend using the native Magento cron to run these jobs, configuring schedules if necessary, rather than a custom server-side cron implementation of the CLI command.
In a non-production environment, you may not be running the cron. You can trigger only the Klevu cron jobs using the following command.
bin/magento cron:run --group klevuAttribute Discovery
Runs once a day as a fall back in case the addition or removal of any attributes was missed by our event observers and plugins.
<job name="klevu_indexing_discover_attributes"
instance="Klevu\Indexing\Cron\DiscoverAttributes"
method="execute">
<schedule>52 1 * * *</schedule>
</job>Attribute Sync
Runs every 10 minutes (by default, the schedule is configurable in the admin)
<job name="klevu_indexing_sync_attributes"
instance="Klevu\Indexing\Cron\SyncAttributes"
method="execute">
<config_path>klevu/indexing/attribute_cron_expr</config_path>
</jobEntity Discovery
Runs once a day as a fall back in case the addition or removal of any entities was missed by our event observers and plugins.
<job name="klevu_indexing_discover_entities"
instance="Klevu\Indexing\Cron\DiscoverEntities"
method="execute">
<schedule>0 2 * * *</schedule>
</job>Entity Sync
Runs every 30 minutes (by default, the schedule is configurable in the admin)
<job name="klevu_indexing_sync_entities"
instance="Klevu\Indexing\Cron\SyncEntities"
method="execute">
<config_path>klevu/indexing/entity_cron_expr</config_path>
</job>Entity Sync History Consolidation
Runs once a day to consolidate the days sync history into one database entry.
<job name="klevu_indexing_sync_history_consolidation"
instance="Klevu\Indexing\Cron\SyncHistoryConsolidation"
method="execute">
<schedule>2 0 * * *</schedule>
</job>Entity Sync History Consolidation Clean
Runs once a day to remove sync history older than x days.
<job name="klevu_indexing_sync_history_consolidation_clean"
instance="Klevu\Indexing\Cron\SyncHistoryConsolidationClean"
method="execute">
<schedule>10 0 * * *</schedule>
</job>>Number of days defaults to 7 and is configured in the admin klevu/indexing/remove_indexing_history_after_days