A note from 2026: This article was published in 2016. The hybris product is now SAP Commerce Cloud, and HMC is a legacy/deprecated administration tool; CronJobs are typically managed through Backoffice or automation scripts adapted to current SAP Commerce Cloud versions.

Introduction

A Cron job is a term for a command that is run on a regular schedule, triggered by a system event or manually. There are different types of preconfigured cron jobs in hybris, namely:

In hybris, cron jobs don’t have any inputs other than the cron job configuration and the current state of the system. When executed, cron jobs perform checks and take actions depending on the cron job’s purpose: updating or removing information in the database or file system.

For developers, manually triggering cron jobs during development is a common task. Hybris provides web tools for cron job management: Backoffice and HMC. These options are good for single use, but if you need to do it repeatedly, it is much easier to use the console utility.

Indexing is a cron job task, so if you change the logic of the indexer, which is a more or less common task for large projects, you will need to execute it many times during development or testing. For this particular task, the console tool is especially useful.

Usage

Show all configured cron jobs:

./hybrisCronjob.sh -a

Change the status of a particular cron job:

./hybrisCronjob.sh -c <cronjobName> -s <true/false>

Execute the cron job:

./hybrisCronjob.sh -e <cronjobName>
./hybrisCronJob.sh -e full-electronicsIndex-cronJob

Video

© Rauf Aliev, August 2016