kuu.scheduler.schedule._impl.every

Module Contents

Classes

every

Fires at a fixed interval within each calendar day, starting from starting.

API

class kuu.scheduler.schedule._impl.every.every(*, hours: int = 0, minutes: int = 0, seconds: int = 0, starting: datetime.time = time(0, 0, 0))[source]

Bases: kuu.scheduler.schedule.abc.Schedule

Fires at a fixed interval within each calendar day, starting from starting.

The interval is anchored to starting and tiled across the full day, so all occurrences are evenly spaced regardless of what time you first call it.

Example:

every(hours=4, starting=time(3, 28, 6))
# fires at 03:28:06; 07:28:06; 11:28:06 ...

every(minutes=30)
# fires at 00:00; 00:30; 01:00 ...

Initialization

matches(dt: datetime.datetime) bool[source]
next_after(now: datetime.datetime) datetime.datetime[source]