Schedules
To schedule a flow with a flow manager, users must specify a
Schedule
that an associated flow should be run
on. The base Schedule
class allows users to
specify this by providing a function to check whether the flow should be
run, given the current time:
- class flow.schedule.Schedule
A schedule that determines when an associated flow should run.
- __init__(check_time: Callable[[datetime], bool]) None
Initialize the schedule with a member to check the time.
- Parameters:
check_time (Callable[[datetime], bool]) – A function that takes in the current time, and determines whether the flow should be run. This function can assume that the given time is rounded to the nearest minute
In addition, helper children classes are implemented for common schedule patterns:
- class flow.schedule.Always
A schedule to always run a flow.
- __init__() None
Initialize the schedule to always run.
- class flow.schedule.Hourly
A schedule to run a flow each hour.
- __init__() None
Initialize the hourly schedule.