Fixes issue where schedule invoker would crash if it was invoked on second 0
@@ -177,7 +177,7 @@ def get_next_datetime(crontab_notation: str, now_date: datetime.datetime) -> Opt
tz = now_date.tzinfo # type: Any
calculated_dates = [calculate_date(tz.localize(d) if tz else d, last_day, last_weekday) for d in [
- now_date if now_date.second == 0 else None,
+ datetime.datetime(now_date.year, now_date.month, now_date.day, now_date.hour, now_date.minute, now_date.second, now_date.microsecond) if now_date.second == 0 else None,
datetime.datetime(now_date.year, now_date.month, now_date.day, now_date.hour, now_date.minute + 1) if now_date.minute < 60 - 1 else None,
datetime.datetime(now_date.year, now_date.month, now_date.day, now_date.hour + 1) if now_date.hour < 24 - 1 else None,
datetime.datetime(now_date.year, now_date.month, now_date.day + 1) if now_date.day < monthrange(now_date.year, now_date.month)[1] - 1 else None,
