Sorry, this seems like something really basic, but I can't figure out what I'm doing wrong.
I've added Quantum to dependencies.
{:quantum, "~> 3.5"}
I've created a scheduler module:
defmodule Quest.Scheduler do
use Quantum, otp_app: :quest
end
I've added that to the Supervisor children list:
children = [
...
Quest.Scheduler,
...
]
And I've created a function to run with a schedule in the Schedule module (here are 3 of them to try to match the config one):
defmodule Quest.Scheduler do
use Quantum, otp_app: :quest
def do_it() do
IO.puts("YOLO!!!")
end
def do_it([]) do
IO.puts("ROLO!!!")
end
def do_it(_opts) do
IO.puts("ZOLO!!!")
end
end
But get this error saying there is no function that matches:
(Mix) Could not start application quest: Quest.Application.start(:normal, []) returned an error: shutdown: failed to start child: Quest.Scheduler
(EXIT) an exception was raised:
** (FunctionClauseError) no function clause matching in Quantum.Normalizer.normalize_task/1
(quantum 3.5.0) lib/quantum/normalizer.ex:95: Quantum.Normalizer.normalize_task({Quest.Scheduler, :do_it})
Sorry, this seems like something really basic, but I can't figure out what I'm doing wrong.
I've added Quantum to dependencies.
{:quantum, "~> 3.5"}
I've created a scheduler module:
I've added that to the Supervisor children list:
And I've created a function to run with a schedule in the Schedule module (here are 3 of them to try to match the config one):
Here is my cron job from
config.exs
I've also tried this:
But get this error saying there is no function that matches: