PHP code example of mhunesi / yii2-crontab-input

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

    

mhunesi / yii2-crontab-input example snippets


<?= $form->field($model, 'cron')->widget('\mhunesi\crontab\input\CrontabInput',[
    'tab' => 'weekly',
    'tabs' => [
        'minutes' => false, //Minutes tab invisible
        'hourly' => false,  //Minutes tab invisible
        'daily' => false,   //Minutes tab invisible
        'weekly' => true,   //Minutes tab visible
        'monthly' => true,  //Minutes tab visible
        'yearly' => true,   //Minutes tab visible
        'advanced' => false,//Minutes tab invisible
    ]
]) 

<?= \mhunesi\crontab\input\CrontabInput::widget([
        'name' => 'cron'
])