PHP code example of nanjingboy / schedule
1. Go to this page and download the library: Download nanjingboy/schedule 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/ */
nanjingboy / schedule example snippets
use Schedule\Scheduler;
$scheduler = Scheduler::instance();
$schedule->cron()->every()->months($months)->daysOfTheMonth($daysOfTheMonth)->daysOfTheWeek($daysOfTheWeek)->hours($hours)->minutes($minutes)->command($command, $logOptions = array());
$scheduler->cron()->everyMinutes($minutes)->command($command, $logOptions = array());
$scheduler->cron()->everyHours($hours)->minutes($minutes)->command($command, $logOptions = array());
$scheduler->cron()->everyDays($days)->hours($hours)->minutes($minutes)->command($command, $logOptions = array());
$scheduler->cron()->everyMonths($months)->daysOfTheMonth($daysOfTheMonth)->daysOfTheWeek($daysOfTheWeek)->hours($hours)->minutes($minutes)->command($command, $logOptions = array());
$scheduler->cron()->everyYear()->daysOfTheMonth($daysOfTheMonth)->daysOfTheWeek($daysOfTheWeek)->hours($hours)->minutes($minutes)->command($command, $logOptions = array());
$scheduler->cron()->everyWeek()->months($months)->hours($hours)->minutes($minutes)->command($command, $options = array());
$scheduler->cron()->everyWeekday()->months($months)->hours($hours)->minutes($minutes)->command($command, $logOptions = array());
$scheduler->cron()->everyWeekend()->months($months)->hours($hours)->minutes($minutes)->command($command, $logOptions = array());