Skip to content

Commit 77a60cd

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: [Scheduler] Remove some unneeded versionadded directives [Scheduler] Reformat some versionadded directives
2 parents 5865129 + cf8cc5b commit 77a60cd

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

scheduler.rst

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
Scheduler
22
=========
33

4-
.. versionadded:: 6.3
5-
6-
The Scheduler component was introduced in Symfony 6.3
7-
84
The scheduler component manages task scheduling within your PHP application, like
95
running a task each night at 3 AM, every two weeks except for holidays or any
106
other custom schedule you might need.
@@ -140,6 +136,9 @@ It uses the same syntax as the `cron command-line utility`_::
140136

141137
RecurringMessage::cron('* * * * *', new Message());
142138

139+
// optionally you can define the timezone used by the cron expression
140+
RecurringMessage::cron('* * * * *', new Message(), new \DateTimeZone('Africa/Malabo'));
141+
143142
Before using it, you must install the following dependency:
144143

145144
.. code-block:: terminal
@@ -151,10 +150,6 @@ Before using it, you must install the following dependency:
151150
Check out the `crontab.guru website`_ if you need help to construct/understand
152151
cron expressions.
153152

154-
.. versionadded:: 6.4
155-
156-
Since version 6.4, it is now possible to add and define a timezone as a 3rd argument
157-
158153
Periodical Triggers
159154
~~~~~~~~~~~~~~~~~~~
160155

@@ -263,9 +258,9 @@ the Messenger component:
263258
.. image:: /_images/components/scheduler/generate_consume.png
264259
:alt: Symfony Scheduler - generate and consume
265260

266-
.. versionadded:: 6.4
261+
.. tip::
267262

268-
Since version 6.4, you can define your messages via a ``callback`` via the
263+
You can also define your messages via a ``callback`` using the
269264
:class:`Symfony\\Component\\Scheduler\\Trigger\\CallbackMessageProvider`.
270265

271266
Debugging the Schedule
@@ -291,11 +286,11 @@ recurring messages. You can narrow down the list to a specific schedule:
291286
15 4 */3 * * App\Messenger\Foo(0:17..) Mon, 18 Dec 2023 ...
292287
-------------------- -------------------------- ---------------------
293288
294-
.. versionadded:: 6.4
289+
# you can also specify a date to use for the next run date:
290+
$ php bin/console --date=2025-10-18
295291
296-
Since version 6.4, you can even specify a date to determine the next run date
297-
using the ``--date`` option. Additionally, you have the option to display
298-
terminated recurring messages using the ``--all`` option.
292+
# use the --all option to also display the terminated recurring messages
293+
$ php bin/console --all
299294
300295
Efficient management with Symfony Scheduler
301296
-------------------------------------------

0 commit comments

Comments
 (0)