Subscribe to
NSLog(); Header Image

My Morning and Nightly AppleScripts

Two entries in my crontab look a little funny to some people:

0    7    *    *    *    /Users/iacas/
0    23   *    *    *    /Users/iacas/

tell application "System Events"
    if exists (process "ScreenSaverEngine") then
        tell application "System Events" to set volume with output muted
    end if
end tell

tell application "System Events" to set volume without output muted

In other words, one script mutes my computer so that my email application doesn't make noise when I'm trying to sleep. Sometimes I work until 2am, and this setup allows me to do so. When I go to bed I simply try to remember to mute.

One Response to "My Morning and Nightly AppleScripts"

  1. Oh man. I so needed something like this! Thanks!