Replies: 1 comment
-
Have you came across a solution for this issue? I have the same thing happening with one schedule as well, sometimes run on two servers instead of one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
-- MySQL : 5.7.26
-- Redis server: 5.0.8
Description:
We had a server for a Laravel Horizon and for crons. Right now we have deployed 3 more servers for both task. All our commands calls the onOneServer method. Sometimes, that feature is not working properly, allowing two servers executing the same cron at the same time. We are using Redis as cache driver in all the cluster (8 frontends servers and now 4 cron/horizon servers) so I discarded a cache configuration problem (all servers are the "same"). All machines have the same Redis endpoint.
$schedule->command(SomeClass::class, [ '--a-mandatory-param' => 1 ])->onOneServer()->everyThirtyMinutes()->between('9:00','23:00');
I also tried to call runInBackground() method (as the command takes 30 seconds to finish it) to avoid any type of delay problem. But fails also.
Steps To Reproduce:
As this is failing randomly I don't know how to replicate it. I'm working and adding more Logs in other commands to check if those commands are not working properly neither
Beta Was this translation helpful? Give feedback.
All reactions