yzalis/crontab 问题修复 & 功能扩展

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

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

yzalis/crontab

最新稳定版本:1.0.4

Composer 安装命令:

composer require yzalis/crontab

包简介

Create, manage or delete crontab and jobs with php.

README 文档

README

Build Status

SensioLabsInsight

Crontab provide a php 5.3 lib to create crontab file.

use Crontab\Crontab;
use Crontab\Job;

$job = new Job();
$job
	->setMinute('*/5')
	->setHour('*')
	->setDayOfMonth('*')
	->setMonth('1,6')
	->setDayOfWeek('*')
	->setCommand('myAmazingCommandToRunPeriodically')
;

$crontab = new Crontab();
$crontab->addJob($job);
$crontab->write();

You can render what you have created:

echo $crontab->render();

And then you can delete a job you don't want anymore:

$crontab->removeJob($theJobYouWantToDelete);

When you create a Crontab, it will automatically parse your current crontab file and add all present job into your new object.

Explicitely set the constructor argument $parseExistingCrontab to false if you do not want to parse the current crontab file.

Resources

You can run the unit tests with the following command. You need to be in the crontab directory and have phpunit installed on your computer:

phpunit -v

统计信息

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

GitHub 信息

  • Stars: 131
  • Watchers: 14
  • Forks: 53
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-07-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固