Existing users, log in.  New users, create a free account.  Lost password?

Mac OS X  |  System / Utilities  |  Maintenance / Optimization  |  SleepWatcher

SleepWatcher

SleepWatcher - 2.0.5

execute shell scripts upon sleep, wakeup, idleness

All Time: (4.7)
This Version: Not rated (0.0)
Current Version: 2.0.5
Release Date: 2007-11-02
License: Freeware
Downloads (this version): 2,287
Downloads (all versions): 8,732

Information Related to Version:

Broken Link? Newer Version? Tell us!

Product Description:

SleepWatcher is a command line tool (daemon) for Mac OS X that monitors sleep, wakeup and idleness of a Mac. It can be used to execute a Unix command when the Mac or the display of the Mac goes to sleep mode or wakes up or after a given time without user interaction. It also can send the Mac to sleep mode or retrieve the time since last user activity. A StartupItem, sample start and sleep scripts and the source code for sleepwatcher are included in the download. A little bit knowledge of the Unix command line is required to benefit from this software. SleepWatcher is published under the GNU General Public License.

What's new in this version:

  • Mac OS X 10.5. œLeopardÂ? compatibility

Operating System Requirements:

This product is designed to run on the following operating systems:

  • Mac OS X 10.5 Intel
  • Mac OS X 10.5 PPC
  • Mac OS X 10.4 Intel
  • Mac OS X 10.4 PPC
  • Mac OS X 10.3.9
  • Mac OS X 10.3

Additional Requirements:

  • Mac OS X 10.3 or 10.4

Screenshots:

Download Links:

Your Installed Versions:


 

Feedback Summary:

This Version:
Overall Rating: Not rated (0.0) Features: Not rated (0.0) Support: Not rated (0.0)
Ease of Use: Not rated (0.0) Quality / Stability: Not rated (0.0) Price: Not rated (0.0)
Add Your Feedback

Key to Types of Feedback:

ReviewsReviews   TroubleshootingTroubleshooting   Usage TipsUsage Tips   Developer NotesDeveloper Notes   CommentaryCommentary   Featured ReviewsFeatured Reviews

SleepWatcher Troubleshooting ReportWake from sleep before/to enable scheduled shut down - Version: 2.0.5, 4/6/2008 06:57PM PST

Mayitbe4u
I would like a script for that would wake my imac from sleep before its regularly scheduled shut down in "Energy Saver". The problem with Energy Saver is the scheduled shut down never occurs if the computer has gone to sleep mode. One way around that is to not have the computer enter sleep mode--but this is ludicrous and wastes energy rather than saves it. So, again, I need a script that is a work around my objective. Essentially, the script would wake the computer say 5 minutes before the scheduled shut down so that it will indeed get the message to shut down.


Post a commentAlert Admin

SleepWatcher Usage TipFantastic application! - Version: 2.0.4, 5/29/2006 01:05PM PST

brehob
Many thanks to Herr Baehr for such a useful tool!

I've thought for a long time that MacOS should have this capability built in. Besides the SMB shares that disappear on sleep (what's up with that!?), I have other applications that should exit before sleep and start again on wake. I'm glad that SleepWatcher runs shell scripts instead of AppleScripts, although I can see how others would prefer the other.

For anyone having looking for a simple script for mounting and unmounting SMB shares, here's what I use: Create $HOME/.wakeup with this:

#!/bin/sh
#
# This file should be $HOME/.sleep and $HOME/.wakeup.
# This is run by "SleepWatcher" through /etc/rc.sleep and /etc/rc.wakeup
# I've made this one file to keep things consistent.
#

# BSD echo command needs this for escape sequences.
test "$SHELLOPTS" && shopt -s xpg_echo

tel="tell application"
case $0 in
*sleep)
  echo "$tel 42Finder42 to eject 42share42" | osascript -
  ;;
*wakeup)
  echo "$tel 42Finder42 to mount volume 42smb://s/share42" | osascript -
  ;;
esac
Then run "ln .wakeup .sleep" to make them the same file. Wayne
Post a commentAlert Admin

SleepWatcher ReviewExcellent utility - Version: 2.0.3, 1/11/2006 10:56PM PST

grikdog
What a great idea! As for how to use it... Install the SleepWatcher.pkg, then install the SleepWatcher StartupItem.pkg. Launch TextEdit. Enter these lines:

#!/bin/sh
osascript -l AppleScript -e 'tell Application "Finder" to say "Just going to sleep now, ok?"'


(Don't enter these lines ;-)
Save the file as ~/.sleep and wait about 5 minutes for your screensaver to launch. Listen.

That's it. The rest is only limited by imagination. For starters, study the man page: man sleepwatcher Then open /Library/StartupItems/SleepWatcher/SleepWatcher in TextEdit and find the line that starts SleepWatcher. The man page suggests that you can do A LOT MORE than minimum, but the default configuration is powerful.

In my own .sleep file I launch a script to fire off the PostgreSQL dumpall command, if it hasn't run yet. Screensaver time is the perfect time to make a database backup, at least for small personal databases.
Post a commentAlert Admin