andreasgrill / auto-selfcontrol

Small utility to schedule start and stop times of SelfControl
MIT License
305 stars 37 forks source link

How to make block go between days with no space between #35

Open aaryanb opened 5 years ago

aaryanb commented 5 years ago

So currently my blocklist is like the following. Between 23:59 and 0:00 there is one minute and that means I can quickly download a vpn, etc (don't worry about how I'm so fast or anything let's worry about the issure here). If I did Tuesday 0:00 that would be then 24 hours earlier.. so I just have to stay at Tuesday 23:59 and then restart at 0:00 for Wednesday

{ "weekday": 2, "start-hour": 16, "start-minute": 15, "end-hour": 23, "end-minute": 59 }, { "weekday": 3, "start-hour": 0, "start-minute": 0, "end-hour": 7, "end-minute": 31 },

aaryanb commented 5 years ago

Sorry to be bothering you @slambert and @andreasgrill ,but would you possibly have a solution to this small issue? Thank you for your time.

aaryanb commented 5 years ago

@slambert what confuses you specifically, I can try and explain in more detail if you need me to.

JamesS-M commented 5 years ago

@aaryanb If you haven't figured it out by now.

From the docs:

start-hour and start-minute denote the time of the day when the blocking should start, while end-hour and end-minute specify the time it should end. The hours must be defined in the 24 hour digit format. If the ending time is before the start time, the block will last until the next day...

Setting your config to { "weekday": 2, "start-hour": 16, "start-minute": 15, "end-hour": 7, "end-minute": 31, }

will start blocking at 16:15 on Tuesday, and unblock at 7:31 on Wednesday.