PHP code example of elemenx / cron
1. Go to this page and download the library: Download elemenx/cron 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/ */
elemenx / cron example snippets
$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;