PHP code example of babacooll / command-planner

1. Go to this page and download the library: Download babacooll/command-planner 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/ */

    

babacooll / command-planner example snippets




ommandPlanner\CommandPlanner;

$commandPlanner = new CommandPlanner();

$commandPlanner->add(
    new \CommandPlanner\Wrapper\CommandWrapper(
        'CommandPlanner\Tests\Data\TestCommand',
        'Symfony\Component\Console\Application',
        \Cron\CronExpression::factory('* * * * *'),
        [
            'parameters' => ['test'],
            'log_file'   => 'test.log',
            'options'    => []
        ]
    )
);

$commandPlanner->run();



ommandPlanner\CommandPlanner;

$commandPlanner = new CommandPlanner();

$commandPlanner->addCommandsFromConfig('config/config.yml');

$commandPlanner->run();
Shell
$ php composer.phar