Skip to content

🐞 Periodic Task running before set frequency #622

@om1cael

Description

@om1cael
  • I have read the README
  • I have done the setup for Android
  • I have done the setup for iOS
  • I have ran the sample app and it does not work there

Version

Technology Version
Workmanager version 0.8.0
Xcode version
Swift version
iOS deployment target

Describe the error
Hi, I'm using WorkManager and flutter_local_notifications to show notifications with a set frequency (each 2 hours), but the task does not seem to be respecting the interval.

    await Workmanager().registerPeriodicTask(
      'notification',
      'notificationTask',
      frequency: Duration(hours: 2),
      inputData: {
        Settings.wakeUpTime.value: formattedWakeUpTime,
        Settings.sleepTime.value: formattedSleepTime,
        'title': AppLocalizations.of(context)!.reminderNotificationTitle,
        'body': AppLocalizations.of(context)!.reminderNotificationBody,
      }
    );

You can see the frequency is set to 2 hours, but I see notifications being sent with a 15-30 minutes interval from each other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions