Quantum v2.3.4 Quantum.RunStrategy.Random View Source
Run job on one node of the list randomly.
If the node list is :cluster
, one node of the cluster will be used.
This run strategy also makes sure, that the node doesn’t run in two places at the same time
if job.overlap
is falsy.
Mix Configuration
config :my_app, MyApp.Scheduler,
jobs: [
# Run on any node in cluster
[schedule: "* * * * *", run_strategy: {Quantum.RunStrategy.Random, :cluster}],
# Run on any node of given list
[schedule: "* * * * *", run_strategy: {Quantum.RunStrategy.Random, [:"node@host1", :"node@host2"]}],
]
Link to this section Summary
Functions
Normalize given config to a value that has Quantum.RunStrategy.NodeList
implemented
Link to this section Types
Link to this section Functions
Normalize given config to a value that has Quantum.RunStrategy.NodeList
implemented.
Raise / Do not Match on invalid config.
Callback implementation for Quantum.RunStrategy.normalize_config!/1
.