定制 kempfe/cron-manager 二次开发

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

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

kempfe/cron-manager

Composer 安装命令:

composer require kempfe/cron-manager

包简介

Cron Manager for Symfony3

README 文档

README

Cron Manager for Symfony 3 Create managable cron tasks for your symfony project

Installing

1. Add the dependency to your project:

composer require kempfe/cron-manager

2. Add package to your AppKernel.php

<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
            new CronManager\CronManager()
        ];
        ...

3. Update your database

php bin/console doctrine:schema:update --force

####This Package is based on mtdowling/cron-expression Cron Expression Parser

Creating a Cron Task

  1. Create a Symfony Command like described here http://symfony.com/doc/master/components/console.html

  2. Create a new database entry into cm_cron with fields:

    leave the rest of the fields blank

Cron Manager Execution

php bin/console cm:run --interval=600 --processCheck=1

####Options

  • --interval: Your Linux Cron execution interval - default execution interval is 600 seconds
  • --processCheck: When enabled it checks process id to avoid overlapping executions

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GNU
  • 更新时间: 2016-08-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固