2017 © Pedro Peláez
 

neos-package scheduler

Simple task scheduler for Neos Flow Framework

image

ttree/scheduler

Simple task scheduler for Neos Flow Framework

  • Friday, April 27, 2018
  • by ttree
  • Repository
  • 6 Watchers
  • 18 Stars
  • 2,847 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 7 Forks
  • 6 Open issues
  • 9 Versions
  • 24 % Grown

The README.md

Flow & Neos Task Scheduler

A basic tasks scheduler inspired by cron for your Flow and Neos project., (*1)

Create a Task object

You need to implement the Ttree\Scheduler\Task\TaskInterface::, (*2)

class MyTask implements \Ttree\Scheduler\Task\TaskInterface {
    /**
     * @param array
     * @return void
     */
    public function execute(array $arguments = array()) {
        // ...
    }
}

Dynamic Tasks

You can schedule your own Task object, by adding a ```Ttree\Scheduler\Annotations\Schedule`` annotation to your class::, (*3)

use Ttree\Scheduler\Annotations as Scheduler;
/**
 * @Scheduler\Schedule(expression="* * * * *")
 */
class MyTask implements \Ttree\Scheduler\Task\TaskInterface {
    // ...
}

This task will be executed every minute. Dynamic task do not support arguments, the $arguments of the execute method is always an empty array., (*4)

If your expression contains slashes, you have to double-escape them. I.e. run the task every 5 minutes: @Scheduler\Schedule(expression="*\\/5 * * * *"), (*5)

You can also add a description to your task using the Meta annotation::, (*6)

use Ttree\Scheduler\Annotations as Scheduler;
/**
 * @Scheduler\Meta(description="Describes your task.")
 */

Persisted Tasks

You can also create persisted tasks. Persisted tasks support execution argument. You can register the same task object multiple times, if your arguments are different between each task. You can pass a valid JSON arguments array:, (*7)

flow task:register --expression "* */3 * * *" --task "Ttree\Aggregator\Task\AggregatorTask" --arguments '{"node": "af97b530-0c70-7b87-3cf4-f9a611f88c18"}'

Available Configuration Options

Option Default Description
allowParallelExecution true If the scheduler command is executed while the scheduler is already running tasks, the second scheduler waits until the first one is finished

Available CLI helpers

List all available tasks (dynamic and persisted):, (*8)

flow task:list

Run all due tasks (dynamic and persisted):, (*9)

flow task:run

Directly run a single task:, (*10)

flow task:runSingle --task [identifier]

Enable a persisted task:, (*11)

flow task:enable --task [identifier]

Disable a persisted task:, (*12)

flow task:disable --task [identifier]

TODO

Feel free to open issue if you need a specific feature and better send a pull request. Here are some idea for future improvements:, (*13)

  • A Neos backend module to have an overview of tasks
  • Asynchronous task handling or multi thread (pthread support)

Acknowledgments

This package is inspired by Famelo.Scheduler - by mneuhaus., (*14)

Development sponsored by ttree ltd - neos solution provider., (*15)

License

Licensed under GPLv2+, see LICENSE, (*16)

The Versions

27/04 2018

dev-master

9999999-dev

Simple task scheduler for Neos Flow Framework

  Sources   Download

MIT

The Requires

 

task scheduler cron runner

27/04 2018

2.0.1

2.0.1.0

Simple task scheduler for Neos Flow Framework

  Sources   Download

MIT

The Requires

 

task scheduler cron runner

09/05 2017

2.0.0

2.0.0.0

Simple task scheduler for Neos Flow Framework

  Sources   Download

MIT

The Requires

 

task scheduler cron runner

09/05 2017

1.0.4

1.0.4.0

Simple task scheduler for TYPO3 Flow package

  Sources   Download

MIT

The Requires

 

task scheduler cron runner

11/11 2016

1.0.3

1.0.3.0

Flow Framework & Neos Task Scheduler

  Sources   Download

MIT

The Requires

 

task scheduler cron flow neos runner flow framework neos cms

11/11 2016

1.0.2

1.0.2.0

Simple task scheduler for TYPO3 Flow package

  Sources   Download

MIT

The Requires

 

task scheduler cron runner

29/08 2016

dev-dfeyer-patch-1

dev-dfeyer-patch-1

Simple task scheduler for TYPO3 Flow package

  Sources   Download

MIT

The Requires

 

task scheduler cron runner

20/04 2016

1.0.1

1.0.1.0

Simple task scheduler for TYPO3 Flow package

  Sources   Download

MIT

The Requires

 

task scheduler cron runner

20/04 2016

1.0.0

1.0.0.0

Simple task scheduler for TYPO3 Flow package

  Sources   Download

The Requires