Skip to content

Commit 88d64e3

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: [Scheduler] List existing triggers
2 parents c96b061 + 54f98d8 commit 88d64e3

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

scheduler.rst

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,27 @@ Scheduling Recurring Messages
129129
A ``RecurringMessage`` is a message associated with a trigger, which configures
130130
the frequency of the message. Symfony provides different types of triggers:
131131

132+
:class:`Symfony\\Component\\Scheduler\\Trigger\\CronExpressionTrigger`
133+
A trigger that uses the same syntax as the `cron command-line utility`_.
134+
135+
:class:`Symfony\\Component\\Scheduler\\Trigger\\CallbackTrigger`
136+
A trigger that uses a callback to determine the next run date.
137+
138+
:class:`Symfony\\Component\\Scheduler\\Trigger\\ExcludeTimeTrigger`
139+
A trigger that excludes certain times from a given trigger.
140+
141+
:class:`Symfony\\Component\\Scheduler\\Trigger\\JitterTrigger`
142+
A trigger that adds a random jitter to a given trigger. The jitter is some
143+
time that it's added/subtracted to the original triggering date/time. This
144+
allows to distribute the load of the scheduled tasks instead of running them
145+
all at the exact same time.
146+
147+
:class:`Symfony\\Component\\Scheduler\\Trigger\\PeriodicalTrigger`
148+
A trigger that uses a ``DateInterval`` to determine the next run date.
149+
150+
Most of them can be created via the :class:`Symfony\\Component\\Scheduler\\RecurringMessage`
151+
class, as shown in the following examples.
152+
132153
Cron Expression Triggers
133154
~~~~~~~~~~~~~~~~~~~~~~~~
134155

@@ -139,7 +160,7 @@ It uses the same syntax as the `cron command-line utility`_::
139160
// optionally you can define the timezone used by the cron expression
140161
RecurringMessage::cron('* * * * *', new Message(), new \DateTimeZone('Africa/Malabo'));
141162

142-
Before using it, you must install the following dependency:
163+
Before using it, you have to install the following dependency:
143164

144165
.. code-block:: terminal
145166
@@ -219,7 +240,7 @@ Then, define your recurring message::
219240
new SendDailySalesReports('...'),
220241
);
221242

222-
Finally, the recurring messages must be attached to a schedule::
243+
Finally, the recurring messages has to be attached to a schedule::
223244

224245
// src/Scheduler/MyScheduleProvider.php
225246
namespace App\Scheduler;

0 commit comments

Comments
 (0)