-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with WorkManager Periodic Task Scheduling #538
Comments
@ened I have also got an issue in workmanager, periodic task not triggered when app is in killed state. |
I have the same issue. Did you solve @prabhakar1992 @shubham0809200 ? |
I have not been able to find a solution for the problem. |
I checked by running the command |
I would suggest that you implement a non-removable notification to make sure the user knows that the app is working on a background task. I guess as the task is running in the background, which might be causing Android/iOS to terminate the process for security reasons. if you give a notification it will ensure that the user is aware of the process |
You set constraints to network required, that's what caused the delay: constraints: Constraints(
networkType: NetworkType.connected,
), |
Issue with WorkManager Periodic Task Scheduling
Description
I encountered an issue with WorkManager while scheduling a periodic task with a 2-hour interval and a constraint that the network should be available. Here's the scenario:
Expected Behavior
The periodic task should maintain its scheduled interval of 2 hours, irrespective of delays caused by network unavailability. In the scenario described above, the task should have been executed at 3:00 AM and then at 5:00 AM, as per the scheduled interval.
I understand the scenario of why it wasn't able to run at 3:00 AM but it should have gone off at 5:00 AM as per its schedule.
I have provided my code for reference the the end of this issue.
Note: If there are any available solutions or recommendations to address this scenario, I would greatly appreciate any assistance or guidance provided. Thank you.
CODE
The text was updated successfully, but these errors were encountered: