flexic/scheduler-bundle

为 symfony 框架提供调度器组件。

安装: 129

依赖者: 0

建议者: 0

安全性: 0

星标: 3

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

2.0.4 2023-03-19 15:51 UTC

This package is auto-updated.

Last update: 2024-09-19 19:00:47 UTC


README

提供将 PHP 调度器库 集成到 Symfony 框架的功能。

安装

运行

composer require flexic/scheduler-bundle

以安装 flexic/scheduler-bundle

如果您使用 Symfony Flex,则组件将自动启用。要手动启用组件,请将其添加到项目中 config/bundles.php 文件中注册的组件列表。

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

标记调度事件

要将调度事件提供给调度器,您需要使用 scheduler.schedule_event 标记它。

services:
  _instanceof:
    Flexic\Scheduler\Interfaces\ScheduleEventInterface:
      tags: [ 'scheduler.schedule_event' ]

或者

services:
  Your\Schedule\Event\Class:
    tags: [ 'scheduler.schedule_event' ]

许可证

本软件包使用 GNU 许可证授权。

请参阅 LICENSE.md

Donate