From 5e43eca28650a762d7f889382ee833a458b380cc Mon Sep 17 00:00:00 2001 From: jason Date: Thu, 18 Aug 2016 13:15:59 -0600 Subject: probably fix a bug with scheduling standup times over weekends --- warmachine/addons/standup.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/warmachine/addons/standup.py b/warmachine/addons/standup.py index ef873d3..c8e4083 100644 --- a/warmachine/addons/standup.py +++ b/warmachine/addons/standup.py @@ -346,16 +346,16 @@ class StandUpPlugin(WarMachinePlugin): next_standup = datetime(now.year, now.month, now.day, standup_hour, standup_minute) - # If we've already past the time for today, schedule it for that time on the - # next weekday - if now > next_standup: - # if it's friday, wait 72 hours + # If we've already past the time for today, schedule it for that time + # on the next weekday + if now > next_standup or now.isoweekday() > 4: + # if it's friday(5), wait 72 hours if now.isoweekday() == 5: hours = 72 - # if it's saturday, wait 48 + # if it's saturday(6), wait 48 elif now.isoweekday() == 6: hours = 48 - # if it's sunday-thur wait 24 + # if it's sunday(7)-thur(4) wait 24 else: hours = 24 -- cgit v1.2.1