Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SPresnac's avatar

Using a queue with --once on forge

I have several queues on our forge, all running well. For reasons, i need to run a queue with the --once option and that this queue will be restarted every few seconds. Background: When running queues, the app will be bootstraped once and then all this goes to many queue requests. We have a task, that depends on bootstrapping the app on every run. So, is there an option for this???

0 likes
3 replies
bugsysha's avatar

If I understand you then just do not run the queue as daemon and you should get desired behaviour where on every queue job whole app will be started from 0.

SPresnac's avatar

@bugsysha I tried your way, but it turns out, that running a "queue" without the deamon option only works the way, that the whole queue will be processed in one process and after the queue is empty, there will be a new process ... with the "deamon" option, even after the queue is empty the process stays. Both ways are not the way i need. Is there no way to flag a queue with --once ???

bugsysha's avatar

@spresnac

Not really from the Forge UI. Maybe you can write some custom logic for it. How many of those jobs do you process per minute?

Please or to participate in this conversation.