taskmaster icon indicating copy to clipboard operation
taskmaster copied to clipboard

Incorrect interpretation of intervals

Open BZValoche opened this issue 3 years ago • 2 comments

DayInterval and WeekInterval are directly the number of days of weeks between task runs.

BZValoche avatar May 05 '21 10:05 BZValoche

Per MSDN, day intervals and week intervals can both be only 2 values:

https://docs.microsoft.com/en-us/windows/win32/api/taskschd/nf-taskschd-idailytrigger-get_daysinterval https://docs.microsoft.com/en-us/windows/win32/api/taskschd/nf-taskschd-iweeklytrigger-get_weeksinterval

I see what you're trying to do here, but to my knowledge Windows will not allow a day interval or week interval to have any other value then 1 or 2.

I'm going to leave this PR open for a bit in case there's something I'm missing, but regardless thanks for the PR!

capnspacehook avatar May 09 '21 19:05 capnspacehook

Hi, Microsoft's documentation gives an example of how to schedule a task every other day. But if you want 3 days or weeks between successive runs, you surely can enter another value.

Look at this sample task (in french, but I'm sure you'll get it ;-) ): image

DaysInterval definition specifies the value must be between 1 and 365, inclusive. https://docs.microsoft.com/en-us/windows/win32/taskschd/taskschedulerschema-daysinterval-dailyscheduletype-element

WeeksInterval, between 1 and 52. https://docs.microsoft.com/en-us/windows/win32/taskschd/taskschedulerschema-weeksinterval-weeklyscheduletype-element

BZValoche avatar May 11 '21 07:05 BZValoche