Skip to content

Commit

Permalink
Added readme documentation & fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasile Papuc committed Jun 28, 2023
1 parent a7cf486 commit d2c1bae
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: ./vendor/bin/testbench package:test --parallel --no-coverage
run: ./vendor/bin/testbench package:test
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,25 @@ The `after` constraint accept a `CarbonInterface` as well. The difference, is th
->after($order->created_at)
```

### Precision
Hour Precision

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:
```php
->many()
->precision([3-4])
```
This will schedule the email dispatch between 3 AM and 4 AM.

or
```php
->once()
->precision([1])
```
This will schedule the email dispatch at 1 AM.

You can continue this pattern to specify the desired hour(s) within the range of 1 to 24.

### Constraint

The `contraint()` 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.
Expand Down

This file was deleted.

0 comments on commit d2c1bae

Please sign in to comment.