runtraj.execution.schedule.due_hours#

runtraj.execution.schedule.due_hours(now, delay=8, since=None)[source]#

Return the hours a tick at now covers, oldest first, in UTC.

The newest is now less delay hours, down to the hour; the oldest is normally WINDOW_HOURS - 1 hours before it.

since, when given, is the newest hour the project already has (in releases.csv). If the normal window would leave a gap after it, the window reaches back to close the gap instead, at most MAX_BACKFILL_HOURS before its normal start: an outage longer than that is closed a week at a time, by the ticks that follow.

Examples

>>> hours = due_hours(datetime(2026, 10, 29, 18, 15), delay=8)
>>> hours[0], hours[-1]
(datetime.datetime(2026, 10, 28, 11, 0), datetime.datetime(2026, 10, 29, 10, 0))
>>> due_hours(
...     datetime(2026, 10, 29, 18, 15), delay=8, since=datetime(2026, 10, 28, 0)
... )[0]
datetime.datetime(2026, 10, 28, 1, 0)
Return type:

list[datetime]

Parameters: