This solves the problem when alarm intervals are relatively high (10+ min) and a task gets stuck running.
Tasks executed by an alarm will have now between 1 to 3 minutes to complete their execution, making the alarm-based runner consistent with the event-based runner.
To plugin's users reading this: Why not keep the task execution unbounded? Android does not like long running services. By limiting the maximum time a task can be running we reduce the chances of Android killing the task execution service. If you need a long running process, run the task on a recurrent basis instead and save its progress at the end of the execution in order to continue the task in subsequent executions.
Closes #47
This solves the problem when alarm intervals are relatively high (10+ min) and a task gets stuck running.
Tasks executed by an alarm will have now between 1 to 3 minutes to complete their execution, making the alarm-based runner consistent with the event-based runner.
To plugin's users reading this: Why not keep the task execution unbounded? Android does not like long running services. By limiting the maximum time a task can be running we reduce the chances of Android killing the task execution service. If you need a long running process, run the task on a recurrent basis instead and save its progress at the end of the execution in order to continue the task in subsequent executions.