承接 guikingone/scheduler-bundle 相关项目开发

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

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

guikingone/scheduler-bundle

最新稳定版本:0.10.5

Composer 安装命令:

composer require guikingone/scheduler-bundle

包简介

A Symfony bundle that allows to schedule and create repetitive tasks

README 文档

README

SchedulerBundleHero

Current bundle version Packagist Downloads PHP version requirement Symfony Insight Infection score License FOSSA status

Daily runs
Code style Infection PHPUnit Rector Security Static analysis
Code style Infection PHPUnit Rector Security Static analysis

A Symfony bundle built to schedule/consume repetitive tasks

Main features

  • External transports (Doctrine, Redis, etc)
  • External configuration storage (Doctrine, Redis, etc)
  • Retry / Remove / Sort policies
  • Background worker
  • Symfony/Messenger integration
  • Mercure integration
  • Fibers support

Installation

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

composer require guikingone/scheduler-bundle

Quick start

If symfony/flex is not installed, manually update the config/bundles.php:

// config/bundles.php

return [
    // ...
    SchedulerBundle\SchedulerBundle::class => ['all' => true],
];

Then configure a transport in config/packages/scheduler.yaml:

# config/packages/scheduler.yaml
scheduler_bundle:
    transport:
        dsn: 'filesystem://first_in_first_out'

Finally, it's time to create a simple task:

# config/packages/scheduler.yaml
scheduler_bundle:
    transport:
        dsn: 'filesystem://first_in_first_out'
    tasks:
        foo:
            type: 'command'
            command: 'cache:clear'
            expression: '*/5 * * * *'
            description: 'A simple cache clear task'
            options:
                env: test

When a task is configured, time to execute it, two approaches can be used:

  • Adding a cron entry * * * * * cd /path-to-your-project && php bin/console scheduler:consume >> /dev/null 2>&1
  • Launching the command scheduler:consume --wait in a background command

Documentation

Contributing

Want to improve this bundle?

统计信息

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

GitHub 信息

  • Stars: 114
  • Watchers: 3
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-18