next_weekday_time_occurrence#
- scheduler.util.next_weekday_time_occurrence(now: datetime, weekday: Weekday, target_time: time) datetime [source]#
Estimate the next occurrence of a given weekday and time.
Warning
Arguments now and target_time are expected to have the same tzinfo, no internal checks.
- Parameters:
- nowdatetime.datetime
datetime.datetime object of today
- weekdayWeekday
Desired
Weekday
.- target_timedatetime.time
Desired datetime.time.
- Returns:
- datetime.datetime
Next datetime.datetime object with the desired weekday and time.