2017 © Pedro Peláez
 

library cron

Laravel 5.1 queue runner for webcron (with runtime limit)

image

kduma/cron

Laravel 5.1 queue runner for webcron (with runtime limit)

  • Friday, October 21, 2016
  • by kduma
  • Repository
  • 1 Watchers
  • 7 Stars
  • 234 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

L5-cron

Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight StyleCI, (*1)

Laravel 5.1 queue runner for webcron (with runtime limit), (*2)

Setup

Add the package to the require section of your composer.json and run composer update, (*3)

"kduma/cron": "^1.1"

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

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

Usage

Command syntax is like queue:work --daemon with 2 new options:, (*5)

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:, (*6)

WEBCRON_SECRET=YOUR_SECRET

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

You can also configure time limit and/or run limit using following entries in .env:, (*8)

WEBCRON_TIMELIMIT=30
WEBCRON_RUNLIMIT=25

Packagist

View this package on Packagist.org: kduma/cron, (*9)

The Versions

21/10 2016

dev-master

9999999-dev

Laravel 5.1 queue runner for webcron (with runtime limit)

  Sources   Download

MIT

The Requires

 

laravel queue cron

21/10 2016

dev-analysis-qvLe9r

dev-analysis-qvLe9r

Laravel 5.1 queue runner for webcron (with runtime limit)

  Sources   Download

MIT

The Requires

 

laravel queue cron

09/06 2015

v1.1.0

1.1.0.0

Laravel 5.1 queue runner for webcron (with runtime limit)

  Sources   Download

MIT

The Requires

 

laravel queue cron

31/01 2015

v1.0.3

1.0.3.0

Laravel 5 queue runner for webcron (with runtime limit)

  Sources   Download

MIT

The Requires

 

laravel queue cron

31/01 2015

v1.0.2

1.0.2.0

Laravel 5 queue runner for webcron (with runtime limit)

  Sources   Download

MIT

The Requires

 

laravel queue cron

31/01 2015

v1.0.1

1.0.1.0

Laravel 5 queue runner for webcron (with runtime limit)

  Sources   Download

MIT

The Requires

 

laravel queue cron

30/01 2015

v1.0.0

1.0.0.0

Laravel 5 queue runner for webcron (with runtime limit)

  Sources   Download

MIT

The Requires

 

laravel queue cron