`erlcron` 🕥
- Dominant language
- Elixir
- Stars
- 1.7k
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
Need to make time to explore this package: https://github.com/erlware/erlcron
Looks to include _most_ of the use-cases we would need to run a "reminders" type app.
_However_, it is still subject to process/server failure ...
i.e. if the process dies your reminder dies with it. 💀
So ... maybe we need a **_hybrid_ approach**:
1. ***Define*** the **`event`** / **`reminder`** in a [`DSL`](https://en.wikipedia.org/wiki/Domain-specific_language) that can _easily_ be understood by a human and converted to `SQL`.
2. ***Save*** the **`event`** / **`reminder`** to a _distributed_ `Postgres` (or other reliable DB)
3. ***Load*** the **`event`** / **`reminder`** records into a _process_-based **`cron`** when the server starts.
4. All `new` **`event`** / **`reminder`** records are _first_ inserted into `Postgres` for persistence/availability
and then loaded into an `Erlang` `process`.
The open questions are:
A. **How** do we know that a reminder is only loaded on _one_ server/instance to avoid duplication?
B. **Does** `erlcron` understand time-zones? (it appears to, how can we test it to avoid bugs?)
C. **What** happens to an **`event`** / **`reminder`** that is meant to trigger when the server/instance is _offline_?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.