(defn scheduler [db]
(let [now (Instant/now)]
(chime/chime-at (-> (chime/periodic-seq (Instant/now) (Duration/ofMinutes 1)) rest)
(fn [time]
(drop-database db))
)
)
)
Now I'm trying to find a way to start it automatically at startup.
I tried to call the function from -main in core.clj but it doesn't work.
It works if I force to evaluate the function (for example selecting the function and pressing ctrl-enter inside Visual Studio Code) but after a while all te site crashes.
But what I can't figure is the way to start it automatically.
Some hints?
Thanks