PHP code example of agence-adeliom / lumberjack-cron

1. Go to this page and download the library: Download agence-adeliom/lumberjack-cron 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/ */

    

agence-adeliom / lumberjack-cron example snippets


'providers' => [
    ...
    \Adeliom\Lumberjack\Cron\CronProvider::class
]



namespace App\Tasks;

use Adeliom\Lumberjack\Cron\Cron;

class ExampleCronEvent extends Cron
{
    public $every = [
        'seconds'   => 30,
        'minutes'   => 15,
        'hours'     => 1,
    ];
    
    public function handle(){
        update_option('last_ran', current_time('mysql'));
    }
}

return [
    'register' => [
        ...
        App\Tasks\ExampleCronEvent::class
    ],
];
bash
composer configuration file
cp vendor/agence-adeliom/lumberjack-cron/config/crons.php web/app/themes/YOUR_THEME/config/crons.php