PHP code example of swekaj / cron-expression-generator
1. Go to this page and download the library: Download swekaj/cron-expression-generator 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/ */
swekaj / cron-expression-generator example snippets
$faker = \Faker\Factory::create();
$faker->addProvider(new \CronExpressionGenerator\FakerProvider($faker));
// Generator sample output
$faker->cron(); // 12-38 */4 * * 2000/5
$faker->cronMinute(); // */12,30-39
$faker->cronHour(); // 0-23
$faker->cronDayOfMonth(); // L,14W,30
$faker->cronMonth(); // 1/2,6-8
$faker->cronDayOfWeek(); // 0-2,4W,3#2
$faker->cronYear(); // 2012,2000-2039