hybris Runtime Development Tools: hybris CronJob management

Introduction

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

  • SOLR and Lucene related: indexing, updating, removing data,
  • Clean up unnecessary data from the database or file system,
  • Product Catalog synchronization,
  • Regular data export,
  • Workflow,
  • Impex import.

In hybris, cronjobs don’t have any other inputs besides the cronjob configuration and the current state of the system. Being executed, the cronjobs perform some checks and do some actions depending on cronjob purpose: updating or removing the information in the database or file system.

For the developer, it is a common task to manually trigger the cronjobs during the development process. Hybris has web tools for cronjob management, backoffice and HMC. These ways 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 cronjob task, so if you change the logic of the indexer (that is more or less common task for large projects), you will need to execute it many times while the development or testing phase is not over. For this particular task, the console tool is particularly useful.

Usage

Shows all configured cronjobs:

./hybrisCronjob.sh -a

Changes the status of the particular cronjob:

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

Execute the cronjob:

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

Video

 

3 comments

  1. Boufnichel Mohamed · · Reply

    Great work !

    Sorry, i thought is was introduced with the hybris 6.0 !

    have you put it somewhere in github or it’s private ?

    Thanks

    Like

  2. This looks very useful – is there a location of where I can get a hold of this tool?

    Like

    1. Please send a request to me, rauf_aliev@epam.com

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: