setrswim.blogg.se

Newbienudes sleepwatcher
Newbienudes sleepwatcher










newbienudes sleepwatcher

I'll keep testing and if I find it to not work sometimes I'll update my answer, and keep testing other options. On the other hand, in my tests (so far) sleepwatcher has appeared to be quite reliable and fast. The low-level performance just doesn't seem to be there, however, for running a script before sleeping. I'm sorry to have to say that it failed, however, because in so many respects it is a really nicely designed and quite powerful and flexible program. I hope to save you and anyone else reading this the hours of testing it took me to come to this conclusion. Although it is a very impressive program which I would recommend in general, after testing it for this purpose it does NOT actually appear to be able to trigger scripts quickly enough for them to run before your Mac goes to sleep, and instead the sleep script will not run until after the Mac has woken up, which (obviously) defeats the purpose. If you use 'fast user switching' to sleep you will find that scripts which require a logged in user will attempt to run too early and fail unless you modify the Launch Daemon - perhaps grep 'Succeeded' in 'secure.log'.Īnother program which you might discover and be tempted to try is EventScripts. The file is cleared by a log 'Sleep' entry and by Shut Down. The Launch Daemon watches and writes to a temporary file provided the file is empty. My Launch Daemon resides at /Library/LaunchDaemons/ist You may need to increase 'ExitTimeOut' for some scripts. I write a date to z but you could change this to write anything. Tail -1 /Library/Logs/DirectoryService/ | grep -v Sleep || > $z I developed the following simple Launch Daemon to provide a 'wake' trigger for scripts on Leopard:












Newbienudes sleepwatcher