Infrastructure high complexity mobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

Manages platform-specific background execution scheduling using flutter_workmanager, which wraps iOS BGTaskScheduler and Android WorkManager. Registers sync tasks at login, reschedules after each successful sync run, and applies exponential backoff (initial 30s, max 1h) for failed sync attempts. Handles battery-optimized scheduling and OS-imposed constraints on background execution.

Feature: Background Sync

job-scheduler

Responsibilities

  • Register and schedule periodic background sync tasks via flutter_workmanager
  • Apply exponential backoff with configurable initial delay and maximum interval for failed tasks
  • Reschedule sync jobs after each successful completion
  • Respect platform-specific battery optimization and background execution constraints
  • Report scheduling failures and missed execution windows

Interfaces

registerSyncTask(config: SyncTaskConfig)
cancelSyncTask(taskId: String)
rescheduleAfterSuccess()
rescheduleWithBackoff(failureCount: int)
getNextScheduledRun(): DateTime?
isTaskRegistered(taskId: String): bool
getBackoffDelay(failureCount: int): Duration
onTaskExecuted(callback: Function)
getSchedulerStatus(): SchedulerStatus

Relationships

Dependents (1)

Components that depend on this component