PHP code example of comradefuzz / yii2-cron

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

    

comradefuzz / yii2-cron example snippets


    'controllerMap' => [
            'cron' => [
                'class' => 'comradefuzz
                \yii2cron\CronController',
                'crontab' => [
                    ['* * * * *',  'yii app/my-useful-action'],
                    ['* * * * *',  'echo "ONE MORE"'],
                    ['*/5 * * * *',  'echo "Not so fast"'],
                ],
                'log' => true, // Enables logging (default `false`)
                'logCategory' => 'crontab', // Log category (default `crontab`)
            ],
        ]

php composer.phar