承接 kduma/cron 相关项目开发

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

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

kduma/cron

最新稳定版本:v1.1.0

Composer 安装命令:

composer require kduma/cron

包简介

Laravel 5.1 queue runner for webcron (with runtime limit)

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight StyleCI

Laravel 5.1 queue runner for webcron (with runtime limit)

Setup

Add the package to the require section of your composer.json and run composer update

"kduma/cron": "^1.1"

Then add the Service Provider to the providers array in config/app.php but not before Illuminate\Queue\QueueServiceProvider:

KDuma\Cron\CronServiceProvider::class,
KDuma\Cron\WebCronServiceProvider::class,

Usage

Command syntax is like queue:work --daemon with 2 new options:

artisan queue:cron [-t|--timelimit[="..."]] [-r|--runlimit[="..."]] [--queue[="..."]] [--delay[="..."]] [--force] [--sleep[="..."]] [--tries[="..."]] [connection]
  • --timelimit (-t) - Maximum time this command can work in seconds. (default: 60)
  • --runlimit (-r) - Maximum queue jobs to run in. (default: no limit)

Best practices

  • Split your jobs into small tasks that takes small amount of time
  • When you choice time limit, subtract time of longest job

Web Cron

In your .env file add:

WEBCRON_SECRET=YOUR_SECRET

Replace YOUR_SECRET with your secret. Now you can run queue by visiting http://<domain>/cron/YOUR_SECRET url.

You can also configure time limit and/or run limit using following entries in .env:

WEBCRON_TIMELIMIT=30
WEBCRON_RUNLIMIT=25

Packagist

View this package on Packagist.org: kduma/cron

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固