承接 tarasovich/symfony-cron-commands 相关项目开发

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

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

tarasovich/symfony-cron-commands

最新稳定版本:v0.1.1-alpha

Composer 安装命令:

composer require tarasovich/symfony-cron-commands

包简介

Tools to declare symfony commands as cron tasks

README 文档

README

Tools to declare symfony commands as cron tasks (Linux cron config generation and command lock listener)

Interfaces:
  • CronCommandInterface - general cron command, you need to declare getCronInterval(): string
  • LockedCronCommandInterface - enables lock listener on the command
  • LoggedCronCommandInterface - enables output redirection for the command in linux config generation
  • LockedLoggedCronCommandInterface - enables lock listener and output redirection

Installation

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

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

$ composer require tarasovich/symfony-cron-commands

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    Tarasovich\CronCommands\CronCommandsBundle::class => ['all' => true],
];

Step 3: Configure the Bundle

Then configure the bundle by creating config/packages/cron_commands.yaml:

# config/packages/cron_commands.yaml

cron_commands:
  locks:
    enabled: true # Enable lock listener
    template: 'var/run/{command_dashes}.{env}.lock' # Lock file name template relative to project dir or absolute

  linux_config_generation:
    enabled: true # Enable linux config generation command
    templates:
      task: '{interval} {user} php {bin} --env={env} {command} {logging}' # Task template
      log_filename: '{command_dashes}.{env}.log' # Log file name template
    default_options: # Default command options
      bin: '%kernel.project_dir%/bin/console'
      logs: '%kernel.logs_dir%'
      output: '%kernel.project_dir%/var/tmp/self-serve-cron.conf'
      user: '{current_user}'

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固