Voile.Task.LoanReminderScheduler (Voile v0.1.26)

Copy Markdown View Source

Scheduled task that checks for loans due soon and sends reminders.

This task:

  • Runs daily (or at configured interval)
  • Checks for loans due in 3 days and 1 day
  • Sends email notifications to all affected members
  • Broadcasts PubSub notifications for logged-in members

Configuration:

  • Set reminder days in config: config :voile, :loan_reminder_days, [3, 1]
  • Set scheduler interval: config :voile, :loan_reminder_interval, :daily

Summary

Functions

Returns a specification to start this module under a supervisor.

Main function to check and send loan reminders.

Manually trigger a reminder check (useful for testing).

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

send_loan_reminders()

Main function to check and send loan reminders.

start_link(opts \\ [])

trigger_check()

Manually trigger a reminder check (useful for testing).