You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to do some pre-sleep tasks when my MacBook goes to sleep. Especially, unmount several remote volumes, but hs.fs.volume.eject("/Volumes/SomeVolume") is not executed at hs.caffeinate.watcher.systemWillSleep event.
Initially, I've tried this and the unmount wasn't successful:
Hello,
I'm trying to do some pre-sleep tasks when my MacBook goes to sleep. Especially, unmount several remote volumes, but
hs.fs.volume.eject("/Volumes/SomeVolume")
is not executed aths.caffeinate.watcher.systemWillSleep
event.Initially, I've tried this and the unmount wasn't successful:
.sleep
:This also failed:
Using AppleScript also failed:
Is it possible to delay going to sleep and execute all tasks triggered by the
systemWillSleep
event?The text was updated successfully, but these errors were encountered: