Skip to content

Commit ee04bd0

Browse files
committed
[Scheduler] Proposal - initial structure for Symfony Scheduler documentation
1 parent 827744b commit ee04bd0

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

scheduler.rst

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
Scheduler
2+
=========
3+
4+
The Symfony Scheduler is a powerful and flexible component designed to manage the scheduling of tasks within your PHP application.
5+
6+
Introduction to the case:
7+
-------------------------
8+
9+
- Provide a case scenario of sending tasks as messages to different handlers.
10+
- Reference Symfony Messenger for the non recurring approach :doc:`Messenger component docs </components/messenger>`.
11+
- To emphasize that this doesn't cover every situation and that certain cases will require recurrence, we can provide a few examples.
12+
13+
On the basis of a case study in the context of a full stack Symfony application, we will cover the following topics:
14+
15+
Symfony Scheduler basics:
16+
-------------------------
17+
18+
Exploring differences and parallels between Symfony Messenger and Symfony Scheduler.
19+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20+
- Outline the key differences and similarities between Symfony Messenger and Symfony Scheduler.
21+
- Compare the different cycles.
22+
- Introduce the Scheduler Transport and its particularity: generate directly the different messages to handle
23+
24+
The Concept of Recurring Message in Symfony Scheduler
25+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26+
27+
A message associated with a Trigger
28+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29+
30+
- The importance of setting the frequency for your messages: Introduce the concept of a Trigger in Symfony Scheduler encompassing all the different types.
31+
32+
A dynamic vision for the messages generated
33+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34+
35+
- Introduce the possibility to define your message via a callback: MessageCallbackProvider
36+
37+
Clarifying the need to define and attach Recurring Messages to a Schedule.
38+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39+
40+
- Explain the necessity of returning a Schedule (Schedule provider) and attaching recurring messages and the importance of defining on which schedule the recurring messages will be attached.
41+
42+
Exploring alternatives for crafting your Recurring Messages.
43+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44+
45+
- Explore alternative methods for creating recurring messages (via attributes).
46+
47+
48+
Managing Scheduled Messages:
49+
----------------------------
50+
51+
Modifying Scheduled Messages in real time
52+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53+
54+
- Emphasize the importance of dynamically modifying scheduled messages.
55+
56+
Exploring Strategies for adding, removing, and modifying entries within the Schedule
57+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58+
59+
- Discuss approaches to add, remove, or modify messages within the schedule.
60+
- Explore actions within a handler and introduce the concept of events in Symfony.
61+
62+
Managing Scheduled Messages via Events:
63+
---------------------------------------
64+
65+
A strategic event handling
66+
~~~~~~~~~~~~~~~~~~~~~~~~~~
67+
68+
- Explain the different types of events in Symfony (PRE_RUN_EVENT / POST_RUN_EVENT / FAILURE_EVENT)
69+
- Mention the distinctive feature of the PRE_RUN_EVENT to prevent a message from being handled by its designated handler.
70+
71+
Efficient management with Symfony Scheduler:
72+
--------------------------------------------
73+
74+
- Detail the special considerations for efficient management, including caching, locking, and the use of multiple schedules (possibility to scale up your schedules).
75+
- Demonstrate the possibility of redispatching a message.
76+

0 commit comments

Comments
 (0)