Skip to content

[BE-34] Implement Scheduler module for warranty and maintenance alerts #599

@yusuftomilola

Description

@yusuftomilola

Overview

Implement a Scheduler module that runs background jobs to alert users about upcoming warranty expirations and scheduled maintenance inside backend/contrib/.

Location

All work must be inside backend/contrib/src/scheduler/.

Acceptance Criteria

  • SchedulerModule and SchedulerService created using @nestjs/schedule
  • @Cron job runs daily at 8am: finds assets with warrantyExpiration within the next 30 days, logs a warning to console (or emits a notification event)
  • Second @Cron job runs daily at 9am: finds Maintenance records with scheduledDate within the next 7 days and status SCHEDULED, logs warnings
  • ScheduleModule.forRoot() imported in AppModule
  • Jobs are testable by calling the service methods directly

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions