carles/scheduled-command-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

carles/scheduled-command-bundle

Composer 安装命令:

composer require carles/scheduled-command-bundle

包简介

Manage scheduled commands from Symfony

README 文档

README

This bundle lets you schedule commands using the unix at command.

Installation

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

composer require carles/scheduled-command-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Usage

To schedule a command simply configure a ScheduledCommand and persist it:

use CommandSchedulerBundle\Entity\ScheduledCommand;

$scheduledCommand = new ScheduledCommand();

$scheduledCommand->setCommand("echo 'Happy New Year'");
$scheduledCommand->setDatetime(new \DateTime('01-01-2020 00:00:00'));

$this->getDoctrine()->getManager()->persist($scheduledCommand);
$this->getDoctrine()->getManager()->flush();

The bundle uses doctrine events to create an at job with the configured command. The command will be stored in a file under the configured directory.
The default directory is /tmp, but feel free to change it in the configuration:

scheduled_command:
    temp_command_files_dir: /my/directory

At the moment this bundle is only working in unix environments where the at command is installed, but it would be nice to add Windows compatibility in the future.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固