You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,26 @@ The `after` constraint accept a `CarbonInterface` as well. The difference, is th
99
99
->after($order->created_at)
100
100
```
101
101
102
+
### Precision
103
+
Hour Precision
104
+
105
+
The `precision` method provides fine-grained control over when emails are sent using MailatorSchedule. It allows you to specify specific hours or intervals within a 24-hour period. Here's an example of how to use the precision method:
106
+
```php
107
+
->many()
108
+
->precision([3-4])
109
+
```
110
+
This will schedule the email dispatch between '03:00:00' AM and '04:59:59' AM.
111
+
112
+
or
113
+
```php
114
+
->once()
115
+
->precision([1])
116
+
```
117
+
This will schedule the email dispatch between '01:00:00' AM and '01:59:59'.
118
+
119
+
You can continue this pattern to specify the desired hour(s) within the range of 1 to 24.
120
+
121
+
**Important: When using the precision feature in the Mailator scheduler, it is recommended to set the scheduler to run at intervals that are less than an hour. You can choose intervals such as every 5 minutes, 10 minutes, 30 minutes, or any other desired duration.**
102
122
### Constraint
103
123
104
124
The `constraint()` method accept an instance of `Binarcode\LaravelMailator\Constraints\SendScheduleConstraint`. Each constraint will be called when the scheduler will try to send the email. If all constraints return true, the email will be sent.
0 commit comments