We have created one rule to fetch failed task at every 24 hours.
Now instead of every 24 hours we need output as every 4 hours.
We want to change in code instead of scheduling run rule task.
We have created one rule to fetch failed task at every 24 hours.
Now instead of every 24 hours we need output as every 4 hours.
We want to change in code instead of scheduling run rule task.
Hello,
I can think about the below design options:
Hope this can somehow helpful in your case.
Another option would be to use a Custom object as a persistent data store.
Now you can run that rule as often/infrequently as you like, since the rule’s data analysis should be self-sustaining.
Note: I used a List for the failed tasks, but you could also build it to use a Map instead (entry key being the task name and value being the last launched time for example) and base your comparison using the Map containsKey(Object o)
method, and double-checking/confirming if it’s a new failure or not by checking the last launch timestamp of the “discovered failed task” from #2 to the value
element of the saved failure of a previous run that you loaded into your custom object.