g4 / cron
g4 cron like parser with ability to parse expressions with resolution in seconds - based on PHP Cron Expression Parser
Installs: 62 562
Dependents: 3
Suggesters: 0
Security: 0
Stars: 6
Watchers: 10
Forks: 6
Open Issues: 0
Requires
- php: >=5.3.2
- mtdowling/cron-expression: 1.0.3
This package is auto-updated.
Last update: 2024-10-12 13:27:29 UTC
README
Cron - G4 Cron like parser with ability to parse expressions with resolution in seconds - based on PHP Cron Expression Parser
Install
Using Composer and Packagist
composer require g4/cron
require_once 'vendor/autoload.php'; $expression = \G4\Cron\CronExpression::factory('*/3 * * * * * *'); echo date('Y-m-d H:i:s'), ' = ', $expression->getNextRunDate()->format('Y-m-d H:i:s'), PHP_EOL; echo date('Y-m-d H:i:s'), ' = ', $expression->getPreviousRunDate()->format('Y-m-d H:i:s'), PHP_EOL;
Development
Install dependencies
$ make install
Run tests
$ make test
License
(The MIT License) see LICENSE file for details...