dependencies-upgrade
This commit is contained in:
23
vendor/dragonmantank/cron-expression/README.md
vendored
23
vendor/dragonmantank/cron-expression/README.md
vendored
@@ -1,7 +1,7 @@
|
||||
PHP Cron Expression Parser
|
||||
==========================
|
||||
|
||||
[](https://packagist.org/packages/dragonmantank/cron-expression) [](https://packagist.org/packages/dragonmantank/cron-expression) [](http://travis-ci.org/dragonmantank/cron-expression)
|
||||
[](https://packagist.org/packages/dragonmantank/cron-expression) [](https://packagist.org/packages/dragonmantank/cron-expression) [](http://travis-ci.org/dragonmantank/cron-expression) [](https://github.styleci.io/repos/103715337)
|
||||
|
||||
The PHP cron expression parser can parse a CRON expression, determine if it is
|
||||
due to run, calculate the next run date of the expression, and calculate the previous
|
||||
@@ -32,21 +32,21 @@ Usage
|
||||
require_once '/vendor/autoload.php';
|
||||
|
||||
// Works with predefined scheduling definitions
|
||||
$cron = Cron\CronExpression::factory('@daily');
|
||||
$cron = new Cron\CronExpression('@daily');
|
||||
$cron->isDue();
|
||||
echo $cron->getNextRunDate()->format('Y-m-d H:i:s');
|
||||
echo $cron->getPreviousRunDate()->format('Y-m-d H:i:s');
|
||||
|
||||
// Works with complex expressions
|
||||
$cron = Cron\CronExpression::factory('3-59/15 6-12 */15 1 2-5');
|
||||
$cron = new Cron\CronExpression('3-59/15 6-12 */15 1 2-5');
|
||||
echo $cron->getNextRunDate()->format('Y-m-d H:i:s');
|
||||
|
||||
// Calculate a run date two iterations into the future
|
||||
$cron = Cron\CronExpression::factory('@daily');
|
||||
$cron = new Cron\CronExpression('@daily');
|
||||
echo $cron->getNextRunDate(null, 2)->format('Y-m-d H:i:s');
|
||||
|
||||
// Calculate a run date relative to a specific time
|
||||
$cron = Cron\CronExpression::factory('@monthly');
|
||||
$cron = new Cron\CronExpression('@monthly');
|
||||
echo $cron->getNextRunDate('2010-01-12 00:00:00')->format('Y-m-d H:i:s');
|
||||
```
|
||||
|
||||
@@ -65,14 +65,23 @@ A CRON expression is a string representing the schedule for a particular command
|
||||
| +-------------------- hour (0 - 23)
|
||||
+------------------------- min (0 - 59)
|
||||
|
||||
This library also supports a few macros:
|
||||
|
||||
* `@yearly`, `@annually` - Run once a year, midnight, Jan. 1 - `0 0 1 1 *`
|
||||
* `@monthly` - Run once a month, midnight, first of month - `0 0 1 * *`
|
||||
* `@weekly` - Run once a week, midnight on Sun - `0 0 * * 0`
|
||||
* `@daily`, `@midnight` - Run once a day, midnight - `0 0 * * *`
|
||||
* `@hourly` - Run once an hour, first minute - `0 * * * *`
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
- PHP 7.0+
|
||||
- PHP 7.2+
|
||||
- PHPUnit is required to run the unit tests
|
||||
- Composer is required to run the unit tests
|
||||
|
||||
Projects that Use cron-expression
|
||||
=================================
|
||||
* Part of the [Laravel Framework](https://github.com/laravel/framework/)
|
||||
* Available as a [Symfony Bundle - setono/cron-expression-bundle](https://github.com/Setono/CronExpressionBundle)
|
||||
* Available as a [Symfony Bundle - setono/cron-expression-bundle](https://github.com/Setono/CronExpressionBundle)
|
||||
* Framework agnostic, PHP-based job scheduler - [Crunz](https://github.com/lavary/crunz)
|
||||
|
||||
Reference in New Issue
Block a user