johanna v0.1.1 Johanna
Simple wrapper for erlcron
,
the library providing testable cron like functionality for Erlang systems,
with the ability to arbitrarily set the time and place along
with fastforwarding through tests.
Summary
Functions
Runs the given function once
Functions
Runs the given function once.
Examples
▶ Johanna.once(10, fn -> IO.puts("¡Yay!") end)
▷ ... 10 sec pause
▷ "¡Yay!"
▶ Johanna.datetime()
▷ %DateTime{calendar: Calendar.ISO, day: 30, hour: 14, microsecond: {0, 0},
▷ minute: 2, month: 3, second: 43, std_offset: 0, time_zone: "Etc/UTC",
▷ utc_offset: 0, year: 2017, zone_abbr: "UTC"}
once(time, fun)
once(:erlcron.cron_time | :erlcron.seconds | DateTime.t, (... -> any)) :: :erlcron.job_ref