
Public Member Functions | |
| def | __init__ (self, daily_start, daily_end) |
| def | get_routine_tasks (self) |
| def | repeat_every |
| def | repeat_every_day |
| def | repeat_every_delta |
| def | repeat_every_hour |
| def | repeat_every_mins |
Public Attributes | |
| daily_start | |
| routine_duration | |
| routine_tasks | |
An object for setting up the daily schedule of a robot.
Args:
daily_start (datetime.time): The time of day when all tasks can start, local time.
daily_end (datetime.time): The time of day when all tasks should end start, local time.
Definition at line 76 of file task_routine.py.
| def task_executor.task_routine.DailyRoutine.__init__ | ( | self, | |
| daily_start, | |||
| daily_end | |||
| ) |
Definition at line 82 of file task_routine.py.
| def task_executor.task_routine.DailyRoutine.get_routine_tasks | ( | self | ) |
Definition at line 179 of file task_routine.py.
| def task_executor.task_routine.DailyRoutine.repeat_every | ( | self, | |
| tasks, | |||
| daily_start, | |||
| daily_duration, | |||
times = 1 |
|||
| ) |
Repeat the given task a number of times during the given time window.
Args:
daily_start (datetime.time): The time of day when the given tasks can start, local time.
daily_duration (datetime.timedelta): The duration of time during which the tasks can be executed
times: the number of times to execute the tasks in the window
Definition at line 151 of file task_routine.py.
| def task_executor.task_routine.DailyRoutine.repeat_every_day | ( | self, | |
| tasks, | |||
times = 1 |
|||
| ) |
Repeat the given tasks a number of times during the day.
Definition at line 95 of file task_routine.py.
| def task_executor.task_routine.DailyRoutine.repeat_every_delta | ( | self, | |
| tasks, | |||
delta = timedelta(hours=1), |
|||
times = 1, |
|||
start_time = None, |
|||
duration = None |
|||
| ) |
Repeat the given tasks every delta, a given number of times from the start time for the total given duration.
Args:
tasks: The list of tasks to repeat
delta (datetime.timedelta): The delta for the repetition (e.g. if this is one hour then the tasks repeat every hour, with each task having an hour time window for execution)
times (int): The number of times to repeat the tasks in each window
start_time (datetime.time): The time of day when the repetition should start.
duration (datetime.timedelta): The total length of time that should not be exceeded by the complete list of repetitions
Definition at line 103 of file task_routine.py.
| def task_executor.task_routine.DailyRoutine.repeat_every_hour | ( | self, | |
| tasks, | |||
hours = 1, |
|||
times = 1 |
|||
| ) |
Repeat the given tasks x times every n hours
Definition at line 144 of file task_routine.py.
| def task_executor.task_routine.DailyRoutine.repeat_every_mins | ( | self, | |
| tasks, | |||
mins = 30, |
|||
times = 1 |
|||
| ) |
Repeat the given tasks x times every n minutes
Definition at line 136 of file task_routine.py.
| task_executor.task_routine.DailyRoutine.daily_start |
Definition at line 91 of file task_routine.py.
| task_executor.task_routine.DailyRoutine.routine_duration |
Definition at line 92 of file task_routine.py.
| task_executor.task_routine.DailyRoutine.routine_tasks |
Definition at line 93 of file task_routine.py.