PHP code example of job-runner / job-runner

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

    

job-runner / job-runner example snippets




declare(strict_types=1);

use JobRunner\JobRunner\Job\CliJob;
use JobRunner\JobRunner\Job\JobList;
use JobRunner\JobRunner\CronJobRunner;

 '/tutu2.php', '* * * * *'));

CronJobRunner::create()->run($jobList);

// or

CronJobRunner::create()->run(JobList::fromArray([
    [
        'command' => 'php ' . __DIR__ . '/tutu.php',
        'cronExpression' => '* * * * *',
    ],[
    [
        'command' => 'php ' . __DIR__ . '/tutu2.php',
        'cronExpression' => '* * * * *',
    ]
]));




declare(strict_types=1);

use JobRunner\JobRunner\Job\CliJob;
use JobRunner\JobRunner\Job\JobList;
use JobRunner\JobRunner\CronJobRunner;

. '/tutu.php', '* * * * *'));

CronJobRunner::create()->withPersistingStore($mySymfonyLockerStore)->run($jobList);