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

sr57's avatar
Level 39

Job every 10s with Laravel?

I'm able to run job every ~10s outside of Laravel but since this job is part of a new Laravel app I wonder if can do it inside.

My first try was to create a job with a sleep(10) and call it with dispatchAfterResponse.

It works until I get an error "Maximum Execution Time"

I think to create an "auto-refresh" page but maybe there is a better solution?

Thanks for any advice.

0 likes
4 replies
sr57's avatar
Level 39

Thanks @nimrod for this link, I didn't see it.

That said, it's not closed and the solution seems to be what I already did (sleep), but nobody spoke of the "Maximum Execution Time", maybe I did st wrong ...

It's late, to be continued tomorrow ...

sr57's avatar
Level 39

Thanks @tykus

Spatie Sub-Minute package does the job, this answers the question.

That said, as I wrote in my original post, a simple cli php script with a single sleep wotks fine too.

Please or to participate in this conversation.