RenewalNotificationTrigger
Component Detail
Description
Scheduled cron-based trigger that fires RenewalReminderService at regular intervals to detect and dispatch due reminders. Routes outbound notifications through the push-notifications dependency to reach peer mentors via their registered device tokens or email addresses. Handles delivery failures with retry logic and logs trigger execution for audit purposes.
renewal-notification-trigger
Sources & reasoning
Line 114 names automatic expiry reminders as part of HLF's certification requirement. Line 80 provides the critical business rule: an expired certificate removes the peer mentor from chapter listings, making reminders essential to prevent unintentional removal. The Phase 3 roadmap places certification-training at v1.1 (third-phase normalization), consistent with the SHOULD matrix classification at Phase 3.
-
docs/source/likeperson.md · line 114Kursadministrasjon og sertifisering: Påmelding til kurs i appen, automatisk påminnelse ved utløp, digitale sertifikater.
-
docs/source/likeperson.md · line 80HLF kobler dette til sertifisering: ved utgått sertifikat forsvinner likepersonen fra lokallagets nettsider automatisk.
Responsibilities
- Run on a scheduled interval to invoke RenewalReminderService.getRemindersDue
- Pass reminder payloads to the push-notifications system for delivery
- Retry failed notification deliveries with exponential backoff
- Log trigger execution results and delivery outcomes for monitoring
- Emit alerts when repeated delivery failures occur for a given mentor
Interfaces
onSchedule(): Promise<void>
dispatchNotification(payload: ReminderPayload): Promise<DeliveryResult>
retryFailedDeliveries(jobIds: string[]): Promise<void>
getExecutionLog(since: Date): TriggerLog[]