File tree 1 file changed +19
-0
lines changed 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,25 @@ the frequency of the message. Symfony provides different types of triggers:
151
151
:class: `Symfony\\ Component\\ Scheduler\\ Trigger\\ PeriodicalTrigger `
152
152
A trigger that uses a ``DateInterval `` to determine the next run date.
153
153
154
+ The :class: `Symfony\\ Component\\ Scheduler\\ Trigger\\ JitterTrigger ` and
155
+ :class: `Symfony\\ Component\\ Scheduler\\ Trigger\\ ExcludeTimeTrigger ` are decorators
156
+ and modify the behavior of the trigger they wrap. You can get the decorated
157
+ trigger as well as the decorators by calling the
158
+ :method: `Symfony\\ Component\\ Scheduler\\ Trigger\\ AbstractDecoratedTrigger::inner `
159
+ and :method: `Symfony\\ Component\\ Scheduler\\ Trigger\\ AbstractDecoratedTrigger::decorators `
160
+ methods::
161
+
162
+ $trigger = new ExcludeTimeTrigger(new JitterTrigger(CronExpressionTrigger::fromSpec('#midnight', new MyMessage()));
163
+
164
+ $trigger->inner(); // CronExpressionTrigger
165
+ $trigger->decorators(); // [ExcludeTimeTrigger, JitterTrigger]
166
+
167
+ .. versionadded :: 6.4
168
+
169
+ The :method: `Symfony\\ Component\\ Scheduler\\ Trigger\\ AbstractDecoratedTrigger::inner `
170
+ and :method: `Symfony\\ Component\\ Scheduler\\ Trigger\\ AbstractDecoratedTrigger::decorators `
171
+ methods were introduced in Symfony 6.4.
172
+
154
173
Most of them can be created via the :class: `Symfony\\ Component\\ Scheduler\\ RecurringMessage `
155
174
class, as shown in the following examples.
156
175
You can’t perform that action at this time.
0 commit comments