Skip to content

Add a new cron job event for delegating cron tasks to the respective bundles

Reiter, Christoph requested to merge cron-event into main

Ideally we want the server to call into our cron command every minute and let each bundle decide when it wants to do which tasks.

We try to solve this here be defining a cron event which gets dispatched on every call to dbp:relay:cron. The event object provides an "isDue" method which takes a cron syntax and returns true if the job needs to be run.

Each bundle that needs cron functionality subscribes to the event, calls isDue() with the desired cron expression.

The downside is that we don't have any book keeping of which tasks finished or failed and when they will run next... but it's simple.

Merge request reports