on 2017 Aug 09 2:06 PM
Hi,
I need to create a cronjob trigger to run every 15 minutes. But i would like to exclude the cronjob not to run between 11 AM - 11.29 AM & 9 PM - 9.29 PM.
INSERT_UPDATE Trigger;cronjob(code)[unique=true];cronExpression #% afterEach: impex.getLastImportedItem().setActivationTime(new Date()); ;myJobName; 0 0/15 * ?
I know that this will run for every 15 minutes. But how do i specify the exclusions? Please help.
Thanks Vidhya
Request clarification before answering.
Thank you all for the help. Yes it requires 2 triggers. I did add them and it works fine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Create two triggers for the cron job as like below,
0 0/15 0-11,12-21,22-23 * * ?
0 30-45/15 11,21 * * ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vidya,
You can use cron expression instead of creating two triggers. This expression will work
0 0/15 0-11,12-21,22-23 * * ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The simpliest way to run the task behind the specific cronjob would be in your case to create 2 cronjobs which will be started between 9.30 PM - 11-AM and another one between 11.30 to 9PM.
Otherwise it is more complicated because the configuration within hybris standard is limited in this scenario.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
16 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.