mhunesi / yii2-crontab-input
Yii2 Crontab Input Extensions
Installs: 38
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- npm-asset/cronstrue: 1.94.0
- npm-asset/later: ^1.2.0
- npm-asset/moment: ^2.16.0
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2025-02-20 17:27:56 UTC
README
Yii2 Crontab Input Extensions
Installation
The preferred way to install this extension is through composer.
Either run
composer require mhunesi/yii2-crontab-input "*"
or add
"mhunesi/yii2-crontab-input": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?= $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 ] ]) ?>
Or
<?= \mhunesi\crontab\input\CrontabInput::widget([ 'name' => 'cron' ]) ?>