This extension adds Crontab setup support.
For license information check the LICENSE-file.
This extension requires Linux OS. 'crontab' should be installed and cron daemon should be running.
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yii2tech/crontab or add
"yii2tech/crontab": "*"to the require section of your composer.json.
You can setup cron tab using [[yii2tech\crontab\CronTab]], for example:
use yii2tech\crontab\CronTab; $cronTab = new CronTab(); $cronTab->setJobs([ [ 'min' => '0', 'hour' => '0', 'command' => 'php /path/to/project/yii some-cron', ], [ 'line' => '0 0 * * * php /path/to/project/yii another-cron' ] ]); $cronTab->apply();
