1. Go to this page and download the library: Download geckoboom/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/ */
geckoboom / scheduler example snippets
class ReflectionCaller implements \Geckoboom\Scheduler\CallerInterface
{
protected ReflectionContainer $container;
public function call(\Closure $callback){
$args = [];
$reflectionMethod = new \ReflectionMethod($callback, '__invoke');
$args = [];
foreach ($reflectionMethod->getParameters() as $parameter) {
if (!$this->container->has($parameter->getName()) && $parameter->isDefaultValueAvailable()) {
$args[$parameter->getName()] = $parameter->getDefaultValue();
}
}
return $this->container->call($callback, $args);
}
}