next_minutely_occurrence

scheduler.util.next_minutely_occurrence(now: datetime, target_time: time) datetime[source]

Estimate the next weekly occurrence of a given time.

Warning

Both arguments are expected to have the same tzinfo, no internal checks.

Parameters:
nowdatetime.datetime

datetime.datetime object of today

target_timedatetime.time

Desired datetime.time.

Returns:
datetime.datetime

Next datetime.datetime object with the desired time.