I want to create a simple application which would have no UI, nothing and would do periodic repetive tasks in background. For instance, once per hour, everything would take a few minutes. Nothing else.
I know how to create a phoenix app. I don’t need Phoenix here.
It can be in Elixir or in Erlang also.
How would I go about that?
I would go for…
$ mix new my_project --sup
Just a normal Elixir project, with a supervision tree.
I like quantum. The configuration is similar to a linux cron job so it’s easy to understand when it will trigger
You could make an hourly OS cronjob which calls ‘elixir script.exs’ or calls a compiled self-contained Elixir CLI escript. https://elixirschool.com/en/lessons/advanced/escripts/
I figure the literal bare minimum would be useful here. You can use
Process.send_after with a GenServer handler. https://elixirschool.com/blog/til-send-after/ documents it well.