-
I noticed that a job is seems to be run either zero, once or more than once on each node in a cluster on my local machine. The configuration is: config :export, Export.Scheduler,
jobs: [
[
schedule: "* * * * *",
task: fn -> IO.puts("hello #{inspect(DateTime.utc_now())}") end
]
] If I start three nodes then I get the following output: alice node
Runs onces. bob node
Runs twice. kris node
Runs zero times. I tried adding the config :export, Export.Scheduler,
run_strategy: Quantum.RunStrategy.Random
jobs: [
[
schedule: "* * * * *",
task: fn -> IO.puts("hello #{inspect(DateTime.utc_now())}") end
]
]
Any help would be much appreciated! I am using libcluster to enrol the nodes in a cluster and can see in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@krisleech Quantum automatically distributes tasks across the cluster. (Random Strategy is default) It however does not ensure, that it only runs once in the cluster. This is why it is expected to see jobs being executed random times in your cluster. You can do one of the following:
|
Beta Was this translation helpful? Give feedback.
@krisleech Quantum automatically distributes tasks across the cluster. (Random Strategy is default)
It however does not ensure, that it only runs once in the cluster. This is why it is expected to see jobs being executed random times in your cluster.
You can do one of the following:
highlander
.