Feature #106261
openAdd --time-limit option to messenger:consume
0%
Description
The original Symfony messenger (https://symfony.com/doc/current/messenger.html) has an option --time-limit to specify, how long the messenger:consume service should run before shuts down automatically.
This is useful for environments, where it is not possible to create a system service which re-starts automatically, e.g. in shared-hosting environments (or on all other servers without root access).
In this case it would be nice, if the messenger:consume could be triggered regularly e.g. by the Scheduler (The Scheduler already can be triggered regularly by external HTTP Cron request).
For example: Lets say, the messenger command is scheduled with */5 * * * * and executes messenger:consume --time-limit=16200. So it runs for a bit, shuts down after 4,5 minutes and is restarted if the scheduler invokes the command again after the next 5 minutes passed.