@@ -153,18 +153,31 @@ class, as shown in the following examples.
153153Cron Expression Triggers
154154~~~~~~~~~~~~~~~~~~~~~~~~
155155
156- It uses the same syntax as the `cron command-line utility `_::
156+ Before using cron triggers, you have to install the following dependency:
157+
158+ .. code-block :: terminal
159+
160+ $ composer require dragonmantank/cron-expression
161+
162+ Then, define the trigger date/time using the same syntax as the
163+ `cron command-line utility `_::
157164
158165 RecurringMessage::cron('* * * * *', new Message());
159166
160167 // optionally you can define the timezone used by the cron expression
161168 RecurringMessage::cron('* * * * *', new Message(), new \DateTimeZone('Africa/Malabo'));
162169
163- Before using it, you have to install the following dependency :
170+ You can also use some special values that represent common cron expressions :
164171
165- .. code-block :: terminal
172+ * ``#yearly ``, ``#annually `` - Run once a year, midnight, Jan. 1 - ``0 0 1 1 * ``
173+ * ``#monthly `` - Run once a month, midnight, first of month - ``0 0 1 * * ``
174+ * ``#weekly `` - Run once a week, midnight on Sun - ``0 0 * * 0 ``
175+ * ``#daily ``, ``#midnight `` - Run once a day, midnight - ``0 0 * * * ``
176+ * ``#hourly `` - Run once an hour, first minute - ``0 * * * * ``
177+
178+ For example::
166179
167- composer require dragonmantank/cron-expression
180+ RecurringMessage::cron('#daily', new Message());
168181
169182.. tip ::
170183
0 commit comments