Skip to content

Instantly share code, notes, and snippets.

@benwaldie
Last active December 12, 2015 03:08
Show Gist options
  • Save benwaldie/4704790 to your computer and use it in GitHub Desktop.
Save benwaldie/4704790 to your computer and use it in GitHub Desktop.
TUAW > AppleScripting Notification Center > Scheduling Do Not Disturb > Enable Do Not Disturb
do shell script "defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturb -boolean true"
set theDate to quoted form of (do shell script "date -u +\"%Y-%m-%d %H:%M:%S +0000\"")
do shell script "defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturbDate -date " & theDate
do shell script "killall NotificationCenter"
@varun06
Copy link

varun06 commented Feb 6, 2013

I am getting error for -boolean true in first line. Automator is not running the script and giving the unexpected argument error. is there anything that I am missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment