Skip to content
This repository was archived by the owner on Jan 10, 2022. It is now read-only.

yii2tech/crontab

Repository files navigation

Crontab Extension for Yii 2

This extension adds Crontab setup support.

For license information check the LICENSE-file.

Latest Stable Version Total Downloads Build Status

Requirements

This extension requires Linux OS. 'crontab' should be installed and cron daemon should be running.

Installation

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.

Usage

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();

About

Yii2 extension for crontab support

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages