"before mac goes to sleep" and "after mac wakes from sleep" doesn't work in some cases


#1

Describe the bug

From https://github.com/folivoraAI/BetterTouchTool/issues/2092 :

In BTT's "other" tag , I configure 2 triggers: One named "before mac goes to sleep" and another named "after mac wakes from sleep". Their actions are "Execute Terminal Command".
But there is a problem that if the mac stays asleep for a long time (e.g. one night), it doesn't execute the script configured for the "after mac wakes from sleep"trigger when it wakes up.
(BTT is set up to start on startup, but it doesn't help)

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
N/A

Screenshots

N/A

Device information:

  • User 1 from the former github issue (use case: shut down wifi on sleep, turn it back on on wake):

    • Type of Mac: MacBook Pro 2017 13''
    • macOS version: 10.13.3
    • BetterTouchTool version: 2.340
  • User 2 from the former github issue (use case: switch off a light on sleep, switch it on on wake, using a python script):

    • iMac Mid 2009 with SSD
    • Mac OS 10.13.5
    • BetterTouchTool 2.427
  • User 2 on a new mac: After a week of test, everything seems working as expected:

    • 2018 mac mini
    • Mac OS 10.14.1
    • BetterTouchTool 2.660

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):

N/A