aboutsummaryrefslogtreecommitdiff
path: root/Utility/Scheduled.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-04-11 17:14:19 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-04-11 17:14:19 -0400
commit8da8ec730dc0df29dd97be861938deeb2488dda0 (patch)
tree58726f868af0edc0f14144e0f03788bae80ef7e5 /Utility/Scheduled.hs
parent314ec5d56de69ca6bbd0468d0f4b3b456feeb9b3 (diff)
Last release didn't quite fix the high cpu issue in all cases, this should.
This is supposed to look for a day past the last day it ran, not a month past. Seems to work, at least in anarcat's test case.
Diffstat (limited to 'Utility/Scheduled.hs')
-rw-r--r--Utility/Scheduled.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Utility/Scheduled.hs b/Utility/Scheduled.hs
index 2b7cae2b6..45914aada 100644
--- a/Utility/Scheduled.hs
+++ b/Utility/Scheduled.hs
@@ -121,7 +121,7 @@ calcNextTime (Schedule recurrance scheduledtime) lasttime currenttime
| otherwise -> skip 1
Monthly Nothing
| afterday -> skip 1
- | maybe True (\old -> mnum candidate > mnum old && mday candidate >= (mday old `mod` minmday)) lastday ->
+ | maybe True (\old -> mday candidate > mday old && mday candidate >= (mday old `mod` minmday)) lastday ->
-- Window only covers current month,
-- in case there is a Divisible requirement.
Just $ window candidate (endOfMonth candidate)