@@ -140,6 +140,13 @@ It uses the same syntax as the `cron command-line utility`_::
140
140
141
141
RecurringMessage::cron('* * * * *', new Message());
142
142
143
+ // optionally you can define the timezone used by the cron expression
144
+ RecurringMessage::cron('* * * * *', new Message(), new \DateTimeZone('Africa/Malabo'));
145
+
146
+ .. versionadded :: 6.4
147
+
148
+ The feature to define the cron timezone was introduced in Symfony 6.4.
149
+
143
150
Before using it, you must install the following dependency:
144
151
145
152
.. code-block :: terminal
@@ -151,10 +158,6 @@ Before using it, you must install the following dependency:
151
158
Check out the `crontab.guru website `_ if you need help to construct/understand
152
159
cron expressions.
153
160
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
-
158
161
Periodical Triggers
159
162
~~~~~~~~~~~~~~~~~~~
160
163
@@ -291,11 +294,15 @@ recurring messages. You can narrow down the list to a specific schedule:
291
294
15 4 */3 * * App\Messenger\Foo(0:17..) Mon, 18 Dec 2023 ...
292
295
-------------------- -------------------------- ---------------------
293
296
297
+ # you can also specify a date to use for the next run date:
298
+ $ php bin/console --date=2025-10-18
299
+
300
+ # use the --all option to also display the terminated recurring messages
301
+ $ php bin/console --all
302
+
294
303
.. versionadded :: 6.4
295
304
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.
305
+ The ``--date `` and ``--all `` options were introduced in Symfony 6.4.
299
306
300
307
Efficient management with Symfony Scheduler
301
308
-------------------------------------------
0 commit comments