*Good for yosemite or snow leopard
-
Edit the /System/Library/LaunchDaemons/com.apple.atrun.plist, change the disabled child node from true -> false.
-
Unload the current /System/Library/LaunchDaemons/com.apple.atrun.plist with:
sudo launchctl unload -F /System/Library/LaunchDaemons/com.apple.atrun.plist
Then load the edited version
sudo launchctl load -F /System/Library/LaunchDaemons/com.apple.atrun.plist
-
Test that it works with:
echo blah | at now+1
-
In case the echo fails for a different reason, you should be able to at least see the queue get cleared with:
atq
-
Check your current sleep timeout
sudo systemsetup -getcomputersleep
-
Turn off system sleep
sudo systemsetup -setcomputersleep Never
-
Schedule your at command e.g.
at 4:30am tomorrow cd ~/myapps/autocatinator script/begin_cat_feeding script/unlock_cat_door ^D
-
If using a laptop ensure you're plugged into power :)