Cronjob
Cronjobs is most powerful role in any software development project. Cronjobs is used to create automated tasks responsible for execute code in specific time , regularly at a certain point of time. Basically, cronjobs are used for data backups, update catalog, import or export data file or recalculate prices etc. The key concept of cronjobs, it is to start a long or periodic process in the background and execute all regulars activity in off business hours.
For Understand concept of Cronjob, We need to know about of three types that interact with each another: Cronjob, Job, Trigger and JobPerformable .
JobPerformable: It is interface that contain perform method and tightly related to the Job type. Hybris recommend Generics type when implementing JobPerformable interface and perform method.
AbstractJobPerformable: It provides a basic functionality for a common JobPerformable implementation like request abort handling.
CronJob: It contains the configuration for a single run of a Job and other information, like session settings, for a specific execution or logging configuration.
Job: It describes one kind of execution logic in the system and each CronJob should reference one instance. Although the Job instance does not contain any logic.
ServicelayerJob: it is extends to Job class and provides the springId attribute that references a Spring bean definition of the execution logic. The Spring bean has to implement the JobPerformable interface.
Trigger : It is basically used for Job schedule when Job will run. It could be either on a regular basis or only once.