The great thing about a specific question is that it can be given a specific answer.
For example, the OP said: "There's an excellent Flickr app called SuprSetr which I'd like to automatically launch each morning at 3:55 am. How?"
Answer: Save the following as com.tjluoma.SuprSetr.plist
(or whatever name you prefer, but it should end with .plist) and put it into the folder ~/Library/LaunchAgents (where ~ is your Home Directory):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AbandonProcessGroup</key>
<true/>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.tjluoma.SuprSetr</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/open</string>
<string>-a</string>
<string>SuprSetr</string>
</array>
<key>StartCalendarInterval</key>
<array>
<dict>
<key>Hour</key>
<integer>3</integer>
<key>Minute</key>
<integer>55</integer>
</dict>
</array>
</dict>
</plist>
And then, once the file is in place, you should enter this command in Terminal:
launchctl load ~/Library/LaunchAgents/com.tjluoma.SuprSetr.plist
Then it will be ready to launch the app SuprSetr at 3:55 a.m. every day. (Note: if the computer is asleep at 3:55 a.m., it will run when the computer wakes up.)
From that specific example, once you understand that what this plist
file does does is tell launchd
to run the Terminal command:
/usr/bin/open -a SuprSetr
at the hour '3' and the minute '55', then it should be easy to extrapolate from that to other apps that you want to run at other times.
Now, if you want to write these all by hand, you can do that for free, but an app like Lingon is a good choice (I'd recommend not buying the Mac App Store version, as the app seems to me like something that Apple is not going to like in the world of sandboxing, and you'd get a more feature-rich app from the developer.
My personal preference is for an app called LaunchControl which is free to try, and then the developer asks for something reasonable like US$10, but there is no DRM, no license codes, but instead relies on the good ol' honor system. (It’s my hope that people who use it will live up to the developer's faith in that system.)
The iCalendar specification outlines what is required in an .ics file. In short, a simple .ics file looks like this:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:19970610T172345Z-AF23B2@example.com
DTSTAMP:19970610T172345Z
DTSTART:19970714T170000Z
DTEND:19970715T040000Z
SUMMARY:Bastille Day Party
END:VEVENT
END:VCALENDAR
The UID is a unique identifier. It's mostly used for sequencing multiple iCalendar requests. The iCalendar specification gives guidance for how to create it:
A good method to assure uniqueness is to put the domain name or a
domain literal IP address of the host on which the identifier was
created on the right-hand side of an "@", and on the left-hand side,
put a combination of the current calendar date and time of day (i.e.,
formatted in as a DATE-TIME value) along with some other currently
unique (perhaps sequential) identifier available on the system (for
example, a process id number). Using a DATE-TIME value on the
left-hand side and a domain name or domain literal on the right-hand
side makes it possible to guarantee uniqueness since no two hosts
should be using the same domain name or IP address at the same time.
Though other algorithms will work, it is RECOMMENDED that the
right-hand side contain some domain identifier (either of the host
itself or otherwise) such that the generator of the message identifier
can guarantee the uniqueness of the left-hand side within the scope of
that domain.
Most calendar applications are pretty forgiving of malformed .ics files. If your events are pretty simple (no recurrence, no invitations, etc), it's probably not too difficult to knock together an AppleScript (or whatever scripting language you prefer) to create these for you. Here's one AppleScript for it from StackOverflow.
Best Answer
Short answer… No.
There is no public API that manages the "Do Not Disturb" feature. There are also no frameworks that can achieve this.
Googling would also say it's not the kind of sandbox breakout Apple would be likely to allow in the future, either.