onPause method
Callback when this executor is paused. Returns true if successfully paused, false otherwise.
Implementation
@override
Future<bool> onPause() async {
// cancel all the timers that might have been started
for (var timer in _timers) {
timer.cancel();
}
// cancel the daily cron job
await _scheduledTask.cancel();
return await super.onPause();
}