Page 1 of 1

Help me with scheduler expected logic

Posted: Wed Sep 11, 2013 2:56 pm
by sledgehammer_999
For the admins: I know this isn't a really "Windows" problem. It just so happens, that this section is the most active and I want an answer pretty quickly.


Guys, I am having a brain fart.

I am redesigning the scheduler code logic to fix some weird bugs(no ui change yet). But I have a serious mind block so I ask you: What is the expected behavior of this setting:
"Start: 2:00AM End: 3:00AM When: Weekends"

Does it mean:
A

On Saturday switch on alt speeds at 2:00AM and switch off at 3:00AM
On Sunday switch on alt speeds at 2:00AM and switch off at 3:00AM
On Monday,Tuesday,Wednesday,Thurday,Friday switch off alt speeds.

B

On Saturday switch alt speeds at 2:00AM and switch off at Sunday 3:00AM
All other days off.

I am asking about the current expected behavior of qbittorrent and if it's in line with the general expected behavior from similar functions in other programs.

Re: Help me with scheduler expected logic

Posted: Wed Sep 11, 2013 3:07 pm
by ironcross
My logic says it's A.

Re: Help me with scheduler expected logic

Posted: Wed Sep 11, 2013 4:07 pm
by sledgehammer_999
Thanks that's what I thought too after a while.

Anyway, new code is up in git. The scheduler should be much more robust now. It also allows for easier expansion of its functionality(eg different time periods in the same day).

Re: Help me with scheduler expected logic

Posted: Wed Sep 11, 2013 11:28 pm
by loki
I think I'm thinking of utorrent or maybe it was way back in azureus where it had 1 hour blocks and color coded for on/off alternate time...?

Re: Help me with scheduler expected logic

Posted: Wed Sep 11, 2013 11:51 pm
by sledgehammer_999
No, I am thinking something more versatile and simpler.

1. Have a list of all days predefined
2. Allow to attach multiple time periods to each day with minute-granularity
3. Allow to attach to each time period an action(eg turn on alt speed, stop traffic, shutdown pc, exit qbt etc)