Cron Job is a job-firing schedule that recurs based on calendar-like notions.
The Quartz framework is used as underlying scheduler framework.
With Cron Job, you can specify firing-schedules such as “every Friday at noon”, or “every weekday and 9:30 am”, or even “every 5 minutes between 9:00 am and 10:00 am on every Monday, Wednesday and Friday during January”.
For more details about Cron Expressions please refer to Lesson 6: CronTrigger
In this demo, the CronByGlobalVariableTriggerStartEventBean is defined as the Java class to be executed in the Ivy Program Start element.
This bean gets a cron expression via the variable defined as Cron expression and it will schedule by using the expression.
For this demo, the Cron expression is defining the time to start the cron that simply fires every 5 seconds.
demoStartCronPattern: 0/5 * * * * ?
No special setup is needed for this demo. Only start the Engine and watch out the logging which will be updated every 5 seconds with the following logging entry:
Cron Job ist started at: 2023-01-27 10:43:20.