shouldRunAt method

bool shouldRunAt(
  1. DateTime time
)

Test if this schedule should run at the specified time.

Implementation

bool shouldRunAt(DateTime time) {
  if (seconds?.contains(time.second) == false) return false;
  if (minutes?.contains(time.minute) == false) return false;
  if (hours?.contains(time.hour) == false) return false;
  if (days?.contains(time.day) == false) return false;
  if (weekdays?.contains(time.weekday) == false) return false;
  if (months?.contains(time.month) == false) return false;
  return true;
}