imsamurai/cakephp-task-plugin

Plugin for run deffered (scheduled) tasks (console scripts)

Maintainers

👁 imsamurai

Package info

github.com/imsamurai/cakephp-task-plugin

Homepage

Type:cakephp-plugin

pkg:composer/imsamurai/cakephp-task-plugin

Statistics

Installs: 16

Dependents: 1

Suggesters: 1

Stars: 2

Open Issues: 5

1.1.13 2015-05-21 20:01 UTC

Requires (Dev)

None

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT 4bde0e5b5b5628dbbec3dd02b0cb55971bfb662a

pluginprocesscakephptask


README

👁 Build Status
👁 Coverage Status
👁 Latest Stable Version
👁 Total Downloads
👁 Latest Unstable Version
👁 License

Plugin for run deffered (scheduled) tasks (console scripts)

!Scheduled run is not available yet!

Installation

Composer (for ex. version 1.0.0):

{
	"require": {
		"imsamurai/cakephp-task-plugin": "1.0.0"
	}
}

it installs in Plugin directory (in same level with composer.json) so you may want to add Plugin/Task into ignore file.

or clone:

cd my_cake_app/app
git clone git://github.com/imsamurai/cakephp-task-plugin.git Plugin/Task

or if you use git add as submodule:

cd my_cake_app
git submodule add "git://github.com/imsamurai/cakephp-task-plugin.git" "app/Plugin/Task"

then add plugin loading in Config/bootstrap.php

CakePlugin::load('Task', array('bootstrap' => true));

add tables from Config/Schema/tasks.sql

include https://github.com/symfony/Process and https://github.com/kriswallsmith/spork in your project, for ex with composer (tested with 2.3 version)

Configuration

Write global config if you need to use custom settings function:

Configure::write('Task', array(
 //maximum runned tasks at the same time
 'maxSlots' => <number of slots>
));

Usage

Use TaskClient::add() for adding new tasks Put Console/cake Task.task server in the cron, for ex each 1-5 minutes (depends on your needs) Try http://yourdomain/task/ for basic view