Use composite CronJob in Hybris
1. Overview
In Hybris, a composite cronJob is a composition of multiple cronJobs used when we need to run a bundle of cronJobs successively. It is often referred as an ordered all or nothing execution, e.g. MediaImportComposite composed of MediaImportCronJob and MediaConversionCronJob.
This is an overview of how composite cronJob work.

In this article, I will show you how to create a composite cronJob.
2. Implementation
Let’s assume that we have two cronJobs (totoCronJob and fooCronJob) that we want to run in order, refer to this article for more details on how to create a cronJob.
1. Create two instances of the CompositeEntryModel :
INSERT_UPDATE CompositeEntry ;code[unique=true] ;executableCronJob(code)
;totoCronJobEntry ;totoCronJob
;fooCronJobEntry ;fooCronJob
2. Create an instance of the CompositeCronJobModel and attach the composite entries to it.
INSERT_UPDATE CompositeCronJob ;code[unique=true] ;job(code) ;compositeEntries(code) ;sessionUser(uid)[default=admin] ;sessionLanguage(isocode)[default=en]
;helloCompositeCronJob;compositeJobPerformable;totoCronJobEntry, fooCronJobEntry
3. Run your composite cronJob from HMc.

Solution Architect with 10+ years of experience across full-stack development, DevOps, and enterprise software design. Expert in building scalable architectures, CI/CD pipelines, and internal developer platforms using tools like GitHub Actions, Terraform, Kubernetes (AKS), Azure, and Prometheus. Strong hands-on background in Java, Spring, Node.js, and event-driven systems (Kafka, Mulesoft). Passionate about developer experience, software quality, and platform engineering
Nice Article (y), What happens when a composite entry Crashes (continue the the execution of other entries or abort)? and in this case what is the status of the Composite cronjob ?
Hi, the composite cronJob is an all or nothing execution, which means if a composite entry failed, it will not execute the next one and the composite cronJob will passe to ERROR.
Hi Mouad EL Fakir,
I have created Composite cronjob with 3 entries. Composite cronjob is not failing even first entry getting failed. can you please help me.