Issue
I want to trigger a cronjob at below timings every day 9 a.m. EST, 1 p.m. EST, 10 p.m. EST
Also do we have any other option than cron expression so that client can change this timing easily?
Regards, Rasika
Solution
You need to create three triggers as follows:
INSERT_UPDATE Trigger; cronjob(code)[unique=true]; cronExpression[unique=true]
;your-cronjob-code; 0 0 9 1/1 * ? *
;your-cronjob-code; 0 0 13 1/1 * ? *
;your-cronjob-code; 0 0 22 1/1 * ? *
Note that Hybris Cron Job uses Quartz library and you can learn more about cron expressions at http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html
There are some good websites which help you to create cron expression easily:
Also do we have any other option than cron expression so that client can change this timing easily?
The Hybris backoffice application provides a UI for the business users to create a trigger without using an ImpEx but unfortunately, it too requires a cron expression.
The earlier tool, hMC (shown below) used to provide a nice UI for business users to create a trigger without using a cron expression.
Answered By - Arvind Kumar Avinash