As one of SAP Commerce Cloud's most frequently used features, CronJobs can execute predefined business logic either once or on a regular schedule.
Typical applications of this feature include:
- Updating and synchronizing elements from different catalog versions, for example, Regular synchronization from staged to online versions of product catalogs.
- Assisting data backups or data cleanups, for example, Backing up order placements.
- Triggering data imports and exports, for example, Recalculating prices
The following three different components interact to support the concept of a CronJob:
- Job: Defines what needs to be performed and is usually associated with the designated task. In SAP Commerce Cloud, it generally points to a Java Class that carries the logic to be executed.
- CronJob: Contains the runtime information of a CronJob (a Job's single run). This includes elements such as execution logs, status, and CronJob outcomes.
- Trigger: Sets a schedule to execute a CronJob. It may start manually or automatically, depending on the trigger's specific parameters. The activation can occur at a certain time (such as 12:00 or 16:05) or at regular intervals (daily, monthly, or every five minutes, and so on).