Skip to content

Commit a982ac3

Browse files
committed
minor #20439 [Scheduler] Add some pointers regarding worker processes deployment (pgorod)
This PR was submitted for the 7.2 branch but it was squashed and merged into the 6.4 branch instead. Discussion ---------- [Scheduler] Add some pointers regarding worker processes deployment It took me quite some effort to figure this out... https://stackoverflow.com/questions/79257466/how-does-symfony-scheduler-component-get-triggered/79257514 It's one of those things that are obvious _after_ you know them, and where you should be looking for them, but not before... I think the specific mentions of "cron" in the text are valuable (because people will search for it), even though it's not the wisest option (when compared to supervisor etc). The link will take them to the best-practices. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `7.x` for features of unreleased versions). --> Commits ------- b38b1fa [Scheduler] Add some pointers regarding worker processes deployment
2 parents b89995c + b38b1fa commit a982ac3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scheduler.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,14 @@ the Messenger component:
818818
.. image:: /_images/components/scheduler/generate_consume.png
819819
:alt: Symfony Scheduler - generate and consume
820820

821+
.. tip::
822+
823+
Depending on your deployment scenario, instead of manually executing this
824+
Messenger worker process, you might want to run it with cron, supervisor or systemd,
825+
and ensure workers are running at all times. Check out the `Deploying to Production`_
826+
section of the Messenger component documentation.
827+
828+
821829
Creating a Consumer Programmatically
822830
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
823831

@@ -981,6 +989,7 @@ helping you identify those messages when needed.
981989
to redispatched messages was introduced in Symfony 6.4.
982990

983991
.. _`MakerBundle`: https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html
992+
.. _`Deploying to Production`: https://symfony.com/doc/current/messenger.html#deploying-to-production
984993
.. _`Memoizing`: https://en.wikipedia.org/wiki/Memoization
985994
.. _`cron command-line utility`: https://en.wikipedia.org/wiki/Cron
986995
.. _`crontab.guru website`: https://crontab.guru/

0 commit comments

Comments
 (0)