jdecool / crontab-parser
Parse crontab
1.0.0
2024-01-14 13:52 UTC
Requires
- php: ^8.1
- dragonmantank/cron-expression: ^3.1
Requires (Dev)
- ergebnis/composer-normalize: ^2.41
- friendsofphp/php-cs-fixer: ^3.46
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.5
README
A simple crontab parser written in PHP.
Installation
Install it with Composer:
$ composer require jdecool/crontab-parser
Getting started
<?php $content = <<<CRONTAB # m h dom mon dow command * * * * * /usr/bin/php /path/to/script.php 0 0 * * * /usr/bin/php /path/to/other/script.php CRONTAB; $parser = JDecool\CrontabParser\CrontabParser(); $crontab = $parser->parse($content); // return a `JDecool\CrontabParser\Crontab` instance