PHP code example of jdecool / crontab-parser
1. Go to this page and download the library: Download jdecool/crontab-parser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jdecool / crontab-parser example snippets
$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