Skip to content

Commit

Permalink
Allow scheduling by datetime.time object
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanolofsson committed May 31, 2019
1 parent 2ad368a commit c87e516
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions schedule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ def at(self, time_str):
raise ScheduleValueError('Invalid unit')
if callable(time_str):
self.at_time_fn = time_str
elif isinstance(time_str, datetime.time):
self.at_time = time_str
else:
if not isinstance(time_str, str):
raise TypeError('at() should be passed a string')
Expand Down

0 comments on commit c87e516

Please sign in to comment.