gofmanaa/yii2-crontask 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gofmanaa/yii2-crontask

最新稳定版本:1.4

Composer 安装命令:

composer require gofmanaa/yii2-crontask

包简介

yii2 cron task manager

README 文档

README

yii2 cron task manager

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist gofmanaa/yii2-crontask "*"

or add

"gofmanaa/yii2-crontask": "*"

to the require section of your composer.json file.

Requirements

Linux OS Yii2

Usage

Add to console config:

return [
    'bootstrap' => [
        'crontask'
    ],
    'modules' => [
        'crontask' => [
            'class' => 'gofmanaa\crontask\Module',
            'fileName'=>'cron.txt', //optional
            'params'=>[ '2>&1' ], //common params
            'yiiPath' => null // yii execute path
            'phpPath' => '/usr/bin/php', //default php path
            'tasks'=>[
                'dosomething'=>
                            [
                               'params'=>[ '--some=something' , '>/dev/null' ], //task params
                               'command'=>'path/to/controller/action',
                               'min'=>'*/1',
                               'hour'=>'*',
                               'day'=>'*',
                               'month'=>'*',
                               'dayofweek'=>'*',
                            ],
                'dosomething2'=>
                            [
                                'command'=>'path/to/controller/action',
                                'min'=>'*/2',
                            ],
            ]
        ],
    ],
]

Console command

- crontask                    Provides cron information about console commands.
    crontask/index (default)  Displays available commands or the detailed information
    crontask/ls               List App Cron tasks;   crontask/ls a All cron jobs
    crontask/start            Start cron tasks,  "crontask/start dosomething2"  start single task
    crontask/stop             Stop App cron. "crontask/stop 3"  stop task by index 3 
    crontask/restart          Restart cron tasks

统计信息

  • 总下载量: 12.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-11-24