RFC: Flowpack/Task - A Task Scheduler For Flow

Hello Neos community,

I’d like to introduce a new Flowpack package - GitHub - Flowpack/task: Task Scheduler for Neos - A task scheduler for Flow and Neos and would love to hear your thoughts about the approach and architecture. The package is not released yet (but already in use in real projects) - so nothing is carved in stone and your comments are highly welcome.

Motivation

Neos Flow was missing a builtIn way or default package to run and maintain recurring tasks, such as importer or report-generator. I used GitHub - ttreeagency/Scheduler: A basic tasks scheduler inspired by cron for your Flow Framework and Neos project. a lot in the past, but it has some caveats and it is not the default. To have a default package would enable other package maintainers to ship fitting code to eg. run maintenance tasks for their packages.

Recently I used custom entry-points to run commands triggered by cron jobs which got very intransparent with growing numbers of tasks. I had the need to have a list of all unattended jobs and their status.

Flowpack / Task

I looked into existing implementations of different Frameworks and liked the simple approach of Welcome to php-task’s documentation! — php-task 1.0.0 documentation. Sadly the implementation tries to be super-flexible on the one hand, while makes some symfony based assumptions on the other and so I decided to not wrap the package but reimplement the idea for flow directly.

Working with it already feels pretty good and it serves all my needs so far.
So if you have the need for a scheduler, have look and let me know your thought.

Cheers,
Daniel

3 Likes

Hi Daniel,

just for your information: we developed https://github.com/Flowpack/Flowpack.Prunner recently for a project. It is not a scheduler in the sense of cron, but rather a task manager for pipelines of tasks with dependencies (think like an integrated mini CI / job queue). I thought about integrating scheduled job support (i.e. recurring pipelines schedules) into Prunner, so that would be more generic but could handle the case of recurring tasks easily. One advantage I see is that it’s not needed to hook a Flow command into Cron and run into possible concurrency issues. It would also be possible to have interdependent tasks (with concurrency/parallelism).