sleep_more_important_than_task.plist

Install

curl http://launched.zerowidth.com/plists/54713e90-72e7-0139-26ac-00b9930cc07e/install | sh | source

Your .plist

| edit | download

sleep_more_important_than_task.plist running say "You might think that you'll never do the task if you don't stay up to do it. If the task really is that important, you _will_ do it later; if the task isn't, then sleep is more important":

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.zerowidth.launched.sleep_more_important_than_task</string>
	<key>ProgramArguments</key>
	<array>
		<string>sh</string>
		<string>-c</string>
		<string>say &quot;You might think that you'll never do the task if you don't stay up to do it. If the task really is that important, you _will_ do it later; if the task isn't, then sleep is more important&quot;</string>
	</array>
	<key>StartCalendarInterval</key>
	<dict>
		<key>Hour</key>
		<integer>22</integer>
		<key>Minute</key>
		<integer>59</integer>
	</dict>
</dict>
</plist>

Manual Install

Manual install:

mkdir -p ~/Library/LaunchAgents
curl -o ~/Library/LaunchAgents/com.zerowidth.launched.sleep_more_important_than_task.plist http://launched.zerowidth.com/plists/54713e90-72e7-0139-26ac-00b9930cc07e.xml
launchctl load -w ~/Library/LaunchAgents/com.zerowidth.launched.sleep_more_important_than_task.plist

Or, to install as root:

curl -o ~/Downloads/com.zerowidth.launched.sleep_more_important_than_task.plist http://launched.zerowidth.com/plists/54713e90-72e7-0139-26ac-00b9930cc07e.xml
sudo cp ~/Downloads/com.zerowidth.launched.sleep_more_important_than_task.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/com.zerowidth.launched.sleep_more_important_than_task.plist