Skip to content

Commit

Permalink
docs: tags as constants
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Feb 20, 2021
1 parent 52d661e commit 1382d7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ composer require adhocore/cron-expr:0.1.0

```php
use Ahc\Cron\Expression;
use Ahc\Cron\Normalizer;

Expression::isDue('@always');
Expression::isDue('@hourly', '2015-01-01 00:00:00');
Expression::isDue(Normalizer::HOURLY, '2015-01-01 00:00:00');
Expression::isDue('*/20 * * * *', new DateTime);
Expression::isDue('5-34/4 * * * *', time());

Expand Down Expand Up @@ -92,6 +93,8 @@ Following tags are available and they are converted to real cron expressions bef
- *@30minutes* - every 30 minutes
- *@always* - every minute

> You can refer them with constants from `Ahc\Cron\Normalizer` like `Ahc\Cron\Normalizer::WEEKLY`
### Modifiers

Following modifiers supported
Expand Down

0 comments on commit 1382d7d

Please sign in to comment.