PHPackages                             ttree/scheduler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ttree/scheduler

ActiveNeos-package[Utility &amp; Helpers](/categories/utility)

ttree/scheduler
===============

Simple task scheduler for Neos Flow Framework

3.1.4(3y ago)21108.8k—4.5%14[1 issues](https://github.com/ttreeagency/Scheduler/issues)1MITPHP

Since Apr 19Pushed 6mo ago6 watchersCompare

[ Source](https://github.com/ttreeagency/Scheduler)[ Packagist](https://packagist.org/packages/ttree/scheduler)[ RSS](/packages/ttree-scheduler/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (18)Used By (1)

Flow &amp; Neos Task Scheduler
==============================

[](#flow--neos-task-scheduler)

A basic tasks scheduler inspired by cron for your Flow and Neos project.

Create a Task object
--------------------

[](#create-a-task-object)

You need to implement the `Ttree\Scheduler\Task\TaskInterface`::

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

Dynamic Tasks
-------------

[](#dynamic-tasks)

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

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

or

```
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.

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

You can also add a description to your task using the Meta annotation::

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

or

```
use Ttree\Scheduler\Annotations as Scheduler;
#[Scheduler\Meta(["description" => "Describes your task."])]
```

Persisted Tasks
---------------

[](#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:

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

```

Available Configuration Options
-------------------------------

[](#available-configuration-options)

OptionDefaultDescriptionallowParallelExecutiontrueIf the scheduler command is executed while the scheduler is already running tasks, the second scheduler waits until the first one is finishedAvailable CLI helpers
---------------------

[](#available-cli-helpers)

List all available tasks (dynamic and persisted):

```
flow task:list

```

Run all due tasks (dynamic and persisted):

```
flow task:run

```

Directly run a single task:

```
flow task:runSingle --task [identifier]

```

Enable a persisted task:

```
flow task:enable --task [identifier]

```

Disable a persisted task:

```
flow task:disable --task [identifier]

```

TODO
----

[](#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:

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

Acknowledgments
---------------

[](#acknowledgments)

This package is inspired by [Famelo.Scheduler - by mneuhaus](https://github.com/mneuhaus/Famelo.Scheduler/).

Development sponsored by [ttree ltd - neos solution provider](http://ttree.ch).

License
-------

[](#license)

Licensed under GPLv2+, see [LICENSE](LICENSE)

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance45

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~169 days

Recently: every ~146 days

Total

15

Last Release

1315d ago

Major Versions

1.0.4 → 2.0.02017-05-09

2.0.3 → 3.0.02019-10-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/145363?v=4)[ttree](/maintainers/ttree)[@ttree](https://github.com/ttree)

---

Top Contributors

[![dfeyer](https://avatars.githubusercontent.com/u/221173?v=4)](https://github.com/dfeyer "dfeyer (42 commits)")[![theilm](https://avatars.githubusercontent.com/u/1016315?v=4)](https://github.com/theilm "theilm (22 commits)")[![daniellienert](https://avatars.githubusercontent.com/u/642226?v=4)](https://github.com/daniellienert "daniellienert (7 commits)")[![simstern](https://avatars.githubusercontent.com/u/2580285?v=4)](https://github.com/simstern "simstern (3 commits)")[![lars85](https://avatars.githubusercontent.com/u/1326345?v=4)](https://github.com/lars85 "lars85 (3 commits)")[![booooza](https://avatars.githubusercontent.com/u/18515653?v=4)](https://github.com/booooza "booooza (2 commits)")[![fdchriswaechter](https://avatars.githubusercontent.com/u/110408213?v=4)](https://github.com/fdchriswaechter "fdchriswaechter (2 commits)")[![lcherpit](https://avatars.githubusercontent.com/u/490499?v=4)](https://github.com/lcherpit "lcherpit (1 commits)")[![kdambekalns](https://avatars.githubusercontent.com/u/95873?v=4)](https://github.com/kdambekalns "kdambekalns (1 commits)")[![kabarakh](https://avatars.githubusercontent.com/u/1228395?v=4)](https://github.com/kabarakh "kabarakh (1 commits)")

---

Tags

schedulercrontaskrunner

### Embed Badge

![Health badge](/badges/ttree-scheduler/health.svg)

```
[![Health](https://phpackages.com/badges/ttree-scheduler/health.svg)](https://phpackages.com/packages/ttree-scheduler)
```

###  Alternatives

[symfony/scheduler

Provides scheduling through Symfony Messenger

8910.8M52](/packages/symfony-scheduler)[rewieer/taskschedulerbundle

Task Scheduler with CRON for Symfony

63242.1k](/packages/rewieer-taskschedulerbundle)[webtoolsnz/yii2-scheduler

A scheduled task runner for Yii2 applications

1881.1k](/packages/webtoolsnz-yii2-scheduler)[pmill/php-scheduler

Simple PHP task scheduler

1833.5k](/packages/pmill-php-scheduler)[glooby/task-bundle

Scheduling of tasks for symfony made simple

3216.3k](/packages/glooby-task-bundle)[orisai/scheduler

Cron job scheduler - with locks, parallelism and more

4037.1k4](/packages/orisai-scheduler)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
