4 ms·
Am I the only one who does not understand how the script on the Mac side works? I don't use a Mac and I don't know how "macOS LaunchAgent" operates, so I may be
by zvr 2y ago
Am I the only one who does not understand how the script on the Mac side works? I don't use a Mac and I don't know how "macOS LaunchAgent" operates, so I may be missing some details. But the code presented in the post seems to only check about the state at the 20-minute mark after execution. If the script is fired at 00:00, I take a break at 00:15, return at 00:19, it will still buzz at 00:20.
I assume LaunchAgent restarts the script after it exits, so it is essentially a check that a person has locked the laptop at 20, 40, 60, 80, ... minutes after the initial start of the script, regardless of what other breaks take place.