Skip to content

Commit 9705647

Browse files
authored
Merge pull request #9647 from jdiehl/patch-91
Added guide how to create complex intervals
2 parents 6921d30 + 483dbe0 commit 9705647

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

content/en/docs/refguide/modeling/resources/scheduled-events.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,13 @@ Every time a scheduled event is run it produces an entry in the `System.Processe
196196
### One Session for All Scheduled Events
197197

198198
Each runtime node has one specific session in memory which is used for all scheduled events. Changes to this session are visible for all scheduled events on that node. Things like changing the time zone via a Java action in one scheduled event can lead to unexpected behavior in other scheduled events. You are therefore strongly discouraged from changing the session object for scheduled events.
199+
200+
### Complex Interval Patterns
201+
202+
If you want to implement complex interval patterns, such as running a scheduled event hourly but only on Tuesdays, you can do the following:
203+
204+
1. Create a Scheduled Event that runs at the highest required frequency (in this example, hourly).
205+
1. Add a condition at the start of the microflow triggered by the event which checks whether the additional criteria are met. In this example, you would verify that the current day of the week is Tuesday.
206+
1. Perform the actions relating to the event only if the condition evaluates to true.
207+
208+
This approach allows you to maintain flexibility in scheduling while keeping the logic centralized and easy to manage.

0 commit comments

Comments
 (0)