定制 bitweb/zf2-cron-module 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

bitweb/zf2-cron-module

最新稳定版本:2.0.5

Composer 安装命令:

composer require bitweb/zf2-cron-module

包简介

BitWeb ZF2 module for cron.

README 文档

README

Build Status Coverage Status ZF2 implementation for Cron/Cron

Working with Zend Framework 3? We've got you covered.

Installation

Installation of CronModule uses composer. For composer documentation, please refer to getcomposer.org.

php composer.phar require bitweb/zf2-cron-module:2.0.*

or add to your composer.json

"require": {
  "bitweb/zf2-cron-module": "2.0.*"
}

Then add BitWeb\CronModule to your config/application.config.php

Installation without composer is not officially supported, and requires you to install and autoload the dependencies specified in the composer.json.

Configuration

Add to your configuration:

'cronModule' => [
    'phpPath'    => 'php',
    'scriptPath' => '/path/to/application/public/folder/',
    'jobs'       => [
        [
            'command'  => 'index.php application cron do-job',
            'schedule' => '* * * * *'
        ],
        [
            'command'  => 'index.php application cron do-another-job',
            'schedule' => '0 * * * *'
        ]
    ]
]

General options:

Option Description
phpPath path to the php executable, usually "php"
scriptPath path to your applications public folder, defaults to your root aplication public folder
jobs an array of jobs and their schedules
timeout timeout for the cron job

Options for cron jobs:

Option Description
command the php script command to be run
schedule A valid Cron schedule

You can also get the configutation file sample from config folder config/cronModule.config.php.dist.

Run cron job from command line

php index.php cron module start

统计信息

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

GitHub 信息

  • Stars: 12
  • Watchers: 15
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-03-14