承接 hybridlogic/cron 相关项目开发

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

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

hybridlogic/cron

最新稳定版本:v1.0.3

Composer 安装命令:

composer require hybridlogic/cron

包简介

PHP Crontab is a crontab written in pure PHP with support for parsing standard cron expressions. No shell access required.

README 文档

README

PHP Crontab is a crontab written in pure PHP with support for parsing standard cron expressions. No shell access required.

0.0 Table of Contents

1.0 Introduction 2.0 Examples 3.0 Running Tests 4.0 Troubleshooting 5.0 Changelog

1.0 Introduction

PHP Crontab provides a simple way to register multiple PHP jobs to execute at certain times. Simply set up a regular crontab to hit the script and add as many jobs as you need to.

PHP Crontab supports (almost) the entire crontab expression format syntax. Each Job can have multiple expressions and trigger multiple callbacks.

Cron expression format:

minute | hour | day of month | month | day of week | year (optional)

Field formats:

  • = All values / = Range increment , = List values
  • = Range

Currently only the L keyword is supported for Day of month, to identify the last day of the month. W, # and L (for day of week) are currently NOT supported.

2.0 Examples

$crontab = new \HybridLogic\Cron\Crontab;

$crontab->add_job(
	\HybridLogic\Cron\Job::factory('test')
		->on('* * * * *')
		->trigger(function(){
			echo "test run\n";
		})
	);

$count = $crontab->run();
echo "Executed $count job(s)";

3.0 Running Tests

phpunit tests

4.0 Troubleshooting

Nothing here yet.

5.0 Changelog

[2012-12-14] Initial Version

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 4
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-12