1. Go to this page and download the library: Download evgeek/scheduler 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/ */
evgeek / scheduler example snippets
use Doctrine\DBAL\DriverManager;
use Evgeek\Scheduler\Scheduler;
use Evgeek\Scheduler\Handler\DatabaseLogging;
ion(['url' => $uri]);
//Create new instance of the scheduler
$handler = new DatabaseLogging($conn);
$scheduler = new Scheduler($handler);
//Create, add to scheduler and setup new task
$scheduler->task(function() {
echo 'Hello world!';
})
->schedule()
->every(1);
//Run the scheduler
$scheduler->run();