Closed OldhamMade closed 2 years ago
I added the following options to Tz.WatchPeriodically
(not yet published)
{
Tz.WatchPeriodically,
interval_in_days: 5,
on_update: fn version ->
IO.inspect "New update available #{version}!"
end
}
Is the naming on_update
okay?
Released in v0.21. Let me know if you have any feedback.
Since using
Tz.UpdatePeriodically
on memory-restricted platforms may not be possible, it would be useful ifTz.WatchPeriodically
could call a function whenever it logs that there is an update. This would allow users of the library to do something proactive, like trigger an email or SMS.