PHP code example of orisai / nette-scheduler
1. Go to this page and download the library: Download orisai/nette-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/ */
orisai / nette-scheduler example snippets
namespace Example;
class ExampleJobService
{
public function run(): void
{
// Do something
}
}
use Orisai\Scheduler\Scheduler;
();
$container = $configurator->createContainer();
$scheduler = $container->getByType(Scheduler::class);
$scheduler->run();
* * * * * cd path/to/project && php bin/scheduler.php >> /dev/null 2>&1