@@ -133,6 +133,27 @@ Scheduling Recurring Messages
133
133
A ``RecurringMessage `` is a message associated with a trigger, which configures
134
134
the frequency of the message. Symfony provides different types of triggers:
135
135
136
+ :class: `Symfony\\ Component\\ Scheduler\\ Trigger\\ CronExpressionTrigger `
137
+ A trigger that uses the same syntax as the `cron command-line utility `_.
138
+
139
+ :class: `Symfony\\ Component\\ Scheduler\\ Trigger\\ CallbackTrigger `
140
+ A trigger that uses a callback to determine the next run date.
141
+
142
+ :class: `Symfony\\ Component\\ Scheduler\\ Trigger\\ ExcludeTimeTrigger `
143
+ A trigger that excludes certain times from a given trigger.
144
+
145
+ :class: `Symfony\\ Component\\ Scheduler\\ Trigger\\ JitterTrigger `
146
+ A trigger that adds a random jitter to a given trigger. The jitter is some
147
+ time that it's added/subtracted to the original triggering date/time. This
148
+ allows to distribute the load of the scheduled tasks instead of running them
149
+ all at the exact same time.
150
+
151
+ :class: `Symfony\\ Component\\ Scheduler\\ Trigger\\ PeriodicalTrigger `
152
+ A trigger that uses a ``DateInterval `` to determine the next run date.
153
+
154
+ Most of them can be created via the :class: `Symfony\\ Component\\ Scheduler\\ RecurringMessage `
155
+ class, as shown in the following examples.
156
+
136
157
Cron Expression Triggers
137
158
~~~~~~~~~~~~~~~~~~~~~~~~
138
159
@@ -147,7 +168,7 @@ It uses the same syntax as the `cron command-line utility`_::
147
168
148
169
The feature to define the cron timezone was introduced in Symfony 6.4.
149
170
150
- Before using it, you must install the following dependency:
171
+ Before using it, you have to install the following dependency:
151
172
152
173
.. code-block :: terminal
153
174
@@ -227,7 +248,7 @@ Then, define your recurring message::
227
248
new SendDailySalesReports('...'),
228
249
);
229
250
230
- Finally, the recurring messages must be attached to a schedule::
251
+ Finally, the recurring messages has to be attached to a schedule::
231
252
232
253
// src/Scheduler/MyScheduleProvider.php
233
254
namespace App\Scheduler;
0 commit comments