aboutsummaryrefslogtreecommitdiff
path: root/Utility/Scheduled.hs
Commit message (Collapse)AuthorAge
* adeiu, MissingHGravatar Joey Hess2017-05-16
| | | | | | | | | | | | | | | | Removed dependency on MissingH, instead depending on the split library. After laying groundwork for this since 2015, it was mostly straightforward. Added Utility.Tuple and Utility.Split. Eyeballed System.Path.WildMatch while implementing the same thing. Since MissingH's progress meter display was being used, I re-implemented my own. Bonus: Now progress is displayed for transfers of files of unknown size. This commit was sponsored by Shane-o on Patreon.
* import Data.Time.Format to ensure its Read instance for LocalTime is availableGravatar Joey Hess2015-11-21
| | | | | Seems that Utility.SafeCommand loaded something that indirectly got that instance loaded on unix, but not on Windows recently.
* reorg quickcheck to a separate moduleGravatar Joey Hess2015-11-17
|
* merge hlint changes from propellorGravatar Joey Hess2015-09-13
|
* rejigger imports for clean build with ghc 7.10's AMP changesGravatar Joey Hess2015-05-10
| | | | | The explict import Prelude after import Control.Applicative is a trick to avoid a warning.
* update my email address and homepage urlGravatar Joey Hess2015-01-21
|
* indent with tabs not spacesGravatar Joey Hess2014-10-09
| | | | | | | | | | | Found these with: git grep "^ " $(find -type f -name \*.hs) |grep -v ': where' Unfortunately there is some inline hamlet that cannot use tabs for indentation. Also, Assistant/WebApp/Bootstrap3.hs is a copy of a module and so I'm leaving it as-is.
* fix some mixed space+tab indentationGravatar Joey Hess2014-10-09
| | | | | | | | | This fixes all instances of " \t" in the code base. Most common case seems to be after a "where" line; probably vim copied the two space layout of that line. Done as a background task while listening to episode 2 of the Type Theory podcast.
* relicense general utility library code to BSDGravatar Joey Hess2014-05-10
| | | | | Omitted a couple of files what have had significant contributions from others.
* wrote test case; found bugs in date math; fixed and simplified using ↵Gravatar Joey Hess2014-04-12
| | | | Data.Time.Calendar
* Improve handling on monthly/yearly scheduling.Gravatar Joey Hess2014-04-12
| | | | Avoid back-to-back runs.
* Improve handling on monthly/yearly scheduling.Gravatar Joey Hess2014-04-11
| | | | | | | | | | | | | | | | | | | Code was still buggy, it turns out (though the recursion checker caught it). In the case of (Schedule (Monthly Nothing) AnyTime), where the last run was on yyyy-12-31, it looped forever. Also, the handling of (Schedule (Yearly Nothing) AnyTime) was wacky where the last run was yyyy-12-31. It would suggest a window starting on the 3rd for the next run (because 31 mod 28 is 3). I think that originally I was wanted to avoid running on 01-01 if it had just run on 12-31. But the code didn't accomplish this, and it's not necessary anyway. This is supposed to calculate the next window meeting the schedule, and for (Schedule (Monthly Nothing), the window starts at 01-01 and runs through 01-31. If that causes two back-to-back runs, well the next one will not be until 02-01 at the earliest. Also, back-to-back runs can be avoided, if desired, by using Divisible 2.
* guard against any remaining infinite recursion bugs; throw error if no ↵Gravatar Joey Hess2014-04-11
| | | | | | | | candidate cn be found in next hundred years Note that the exception thrown is not visible in the webapp currently because it crashes one of Cronner's 2 worker threads, which is never checked.
* Last release didn't quite fix the high cpu issue in all cases, this should.Gravatar Joey Hess2014-04-11
| | | | | | | 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.
* rename confusingly named "day"Gravatar Joey Hess2014-04-11
|
* assistant: Fix high CPU usage triggered when a monthly fsck is scheduled, ↵Gravatar Joey Hess2014-04-11
| | | | and the last time the job ran was a day of the month > 12. This caused a runaway loop. Thanks to Anarcat for his assistance, and to Maximiliano Curia for identifying the cause of this bug.
* merge from propellorGravatar Joey Hess2014-04-09
|
* fix quickcheck rangeGravatar Joey Hess2013-11-01
|
* fix handling of schedled time of 12 PMGravatar Joey Hess2013-11-01
|
* test suite found a case that was not properly parsedGravatar Joey Hess2013-10-16
|
* add support for weekly, monthly, and yearly schedules that run on no ↵Gravatar Joey Hess2013-10-15
| | | | specific day
* improve calculation of nextTime for AnyTime eventsGravatar Joey Hess2013-10-13
| | | | | | Allow AnyTime events that still have time to occur in the current day to fall in a window covering the current day, instead of waiting until the next day in the Recurrance.
* better time displayGravatar Joey Hess2013-10-11
|
* 0 pad minutesGravatar Joey Hess2013-10-10
|
* remove duration from ScheduleGravatar Joey Hess2013-10-08
|
* half way complete cronner thread to run scheduled activitiesGravatar Joey Hess2013-10-08
|
* refactorGravatar Joey Hess2013-10-07
|
* comment typoGravatar Joey Hess2013-10-07
|
* calculating the next time on a ScheduleGravatar Joey Hess2013-10-07
| | | | | | | | | Wow! This was hairy, but about 10x less hairy than expected actually! A bit more recursion than I really like, since I think in theory all of this date stuff can be calulated using some formulas I am too lazy too look up. But this doesn't matter in practice; I asked it for nextTime (Schedule (Divisible 100 (Yearly 7)) (SpecificTime 23 59) (MinutesDuration 10)) Nothing .. and it calculated (NextTimeExactly 2100-01-07 23:59:00) in milliseconds.
* better recurrance formattingGravatar Joey Hess2013-10-07
|
* add schedule to vicfgGravatar Joey Hess2013-10-07
|
* quickcheck schedule parsingGravatar Joey Hess2013-10-07
| | | | soo many arbitrary instances, so little time!
* basic data types for scheduled activitiesGravatar Joey Hess2013-10-07
Rather similar to crontab, although with a different format. But with less emphasis on per-minute scheduling. Also, supports weekly events, which cron makes too hard. Also, has a duration field.