-
Bug
-
Resolution: Fixed
-
Minor
-
4.3
The scheduled task timing is incorrect in some cases, and there is insufficient unit testing.
For example, if the current time is 11:56 and you specify hours for a task as */6 with minutes being *, then the next task run should be 12:00 (and after that 12:01, 12:02, etc). But it will actually calculate 12:57. (This mainly affects tasks which take a significant number of minutes to run.)
A similar problem happens if you specify hours as * (even if you specify minutes). For example, if you set a test to run at minutes 30 and hours *, but only on Mondays-Fridays. Suppose the current time when this task is scheduled is let's say 15:13, but it's a Saturday. Instead of running first at 00:30 on Monday, the first run will actually be 15:30 on Monday.
Iit is also possible that it will run tasks on the wrong day. If you set a task to run on Sundays, but only in certain months (e.g. December), then it's possible that the first run will actually be in the correct month but on the wrong day of the week. In my test example, it is scheduled for a Tuesday.
There may be other problems because the way it calculates is, to use a technical term, totally sketch. I'm going to rewrite and add a ton of test cases.