Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 92729a4

Browse files
committed
minor #19428 [Scheduler] List existing triggers (alexandre-daubois)
This PR was merged into the 6.3 branch. Discussion ---------- [Scheduler] List existing triggers Fix #18300 Fix #18096 (outdated but still) Required for #18649 Commits ------- c696b0e [Scheduler] List existing triggers
2 parents e01d2e0 + c696b0e commit 92729a4

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

scheduler.rst

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,34 @@ Scheduling Recurring Messages
133133
A ``RecurringMessage`` is a message associated with a trigger, which configures
134134
the frequency of the message. Symfony provides different types of triggers:
135135

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. This allows to
147+
distribute the load of the scheduled tasks instead of running them all
148+
at the same time.
149+
150+
:class:`Symfony\\Component\\Scheduler\\Trigger\\PeriodicalTrigger`
151+
A trigger that uses a ``DateInterval`` to determine the next run date.
152+
153+
Most of them can be created via the :class:`Symfony\\Component\\Scheduler\\RecurringMessage`
154+
class, as we'll see in the following examples.
155+
136156
Cron Expression Triggers
137157
~~~~~~~~~~~~~~~~~~~~~~~~
138158

139159
It uses the same syntax as the `cron command-line utility`_::
140160

141161
RecurringMessage::cron('* * * * *', new Message());
142162

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

145165
.. code-block:: terminal
146166
@@ -224,7 +244,7 @@ Then, define your recurring message::
224244
new SendDailySalesReports('...'),
225245
);
226246

227-
Finally, the recurring messages must be attached to a schedule::
247+
Finally, the recurring messages has to be attached to a schedule::
228248

229249
// src/Scheduler/MyScheduleProvider.php
230250
namespace App\Scheduler;

0 commit comments

Comments
 (0)