承接 thhan/schedule-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

thhan/schedule-bundle

Composer 安装命令:

composer require thhan/schedule-bundle

包简介

thhan ScheduleBundle

README 文档

README

This bundle offers you the possibility to add console commands to a cronjob with a simple function.

Installation

composer req thhan/schedule-bundle

Register this bundle manually.

// config/bundles.php

return [
    // Other bundles...
    Thhan\ScheduleBundle\ScheduleBundle::class => ['all' => true],
];

Server configuration

Finally you create a cronjob on the server that executes the "schedule:run" command every minute.

* * * * * {path_to_symfony}/bin/console schedule:run >> /dev/null 2>&1

Usage

Add the Trait Schedule class to your console command. Extend the configuration function with the function "addCron". As parameter you pass a string or an array of strings with the formatting of cron jobs.

use Thhan\ScheduleBundle\Command\Schedule;

class YourCommand extends Command {
    use Schedule;

    public function configure() {
        $this->setName('app:test')
             ->addCron('30 3 * * *')
             ->addCron([
                 '*/10 * * * *',
                 '0 22 * * 1'
             ]);
    }
}

Planned

  • add jobs via configuration
  • add logger for output

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固