Infrastructure medium complexity backend
1
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Background job scheduler that triggers the Duplicate Detection Service on a recurring cron interval per organization. Manages job lifecycle to prevent concurrent runs for the same organization, records execution outcomes, and supports dynamic schedule updates without service restarts.

Feature: Duplicate Activity Detection

duplicate-detection-scheduler

Sources & reasoning

The implementation notes specify that detection runs as a scheduled background job. A scheduler component is necessary to manage timing, concurrency guards, and observability independently from the detection logic, keeping the service stateless and testable.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • Schedule and fire recurring duplicate detection jobs per organization
  • Enforce single-concurrency per organization to prevent overlapping runs
  • Record job execution results, durations, and error states
  • Support dynamic schedule reconfiguration per organization

Interfaces

scheduleDetectionJob(organizationId: string, cronExpression: string): void
cancelJob(organizationId: string): void
getJobStatus(organizationId: string): JobStatus
triggerImmediateRun(organizationId: string): Promise<void>

Relationships

Dependencies (1)

Components this component depends on

Related Data Entities (1)

Data entities managed by this component