AlexanderDickie / auto-selfcontrol-rs

Schedule automatic activations of SelfControl
29 stars 0 forks source link

Not starting automatically #3

Closed cyrilmayance closed 1 year ago

cyrilmayance commented 1 year ago

There is an issue with the behaviour of the software, as it doesn't automatically start at the requested time. I went to look for the .plist file generated in the LaunchAgents folder, and it seems off.

Here's what my schedule in the config.aoml file looks like:

[Mon, Tue, Wed, Thu, Fri] = [ (08:30 -> 12:30), (13:30 -> 19:30) ]

And here's what the scheduling part of the .plist file looks like after --deploy:

`StartCalendarInterval

Minute 30 Hour 8
<dict>
    <key>Minute</key>
    <integer>30</integer>
    <key>Hour</key>
    <integer>13</integer>
</dict>
<dict>
    <key>Minute</key>
    <integer>30</integer>
    <key>Hour</key>
    <integer>8</integer>
</dict>
<dict>
    <key>Minute</key>
    <integer>30</integer>
    <key>Hour</key>
    <integer>13</integer>
</dict>
<dict>
    <key>Minute</key>
    <integer>30</integer>
    <key>Hour</key>
    <integer>8</integer>
</dict>
<dict>
    <key>Minute</key>
    <integer>30</integer>
    <key>Hour</key>
    <integer>13</integer>
</dict>
<dict>
    <key>Minute</key>
    <integer>30</integer>
    <key>Hour</key>
    <integer>8</integer>
</dict>
<dict>
    <key>Minute</key>
    <integer>30</integer>
    <key>Hour</key>
    <integer>13</integer>
</dict>
<dict>
    <key>Minute</key>
    <integer>30</integer>
    <key>Hour</key>
    <integer>8</integer>
</dict>
<dict>
    <key>Minute</key>
    <integer>30</integer>
    <key>Hour</key>
    <integer>13</integer>
</dict>
<key>RunAtLoad</key>
<true/>`

Thanks!

AlexanderDickie commented 1 year ago

Hi, thanks, just fixed that + uploaded new binary, there was an error in plist if you had multiple blocks in the config. btw in the config you could also do- * = [(08:30-> ..), ...] [Sat, Sun] = []

maybe i should make this clear in the readme that a specific weekday will override the * ?

cyrilmayance commented 1 year ago

Brilliant, thanks for fixing it so quickly! The .plist file looks much better now. Re the readme, you could explain it indeed, but maybe also add it as a comment directly in the file, so that users don't have to come back to the readme when setting it up?