Dialing down email distractions

I have been experimenting with various productivity hacks lately. I
feel like I’m already fairly productive, based on tracking the amount of
work I accomplish week-to-week. So instead of trying to do more, I’m
trying to maintain the same level of output with less effort (and
hopefully time).

One of the top tips I have seen repeatedly is to reduce the amount of
time spent checking email, and only check it a couple of times per day.
I’m not sure I’m ready go go that hard-core, yet. Our team is spread out
and relies heavily on email for communication. Most of the messages are
important, and there aren’t too many that I feel like I have trouble
keeping up. The biggest issue is that they can be very time-sensitive.
Our code-review process is triggered via email messages generated when a
ticket is given a specific status in trac. If one of us does not notice
the change, the author of the change might be blocked for some period of
time from doing dependent work, until the code review can be completed.
Since we want to encourage code reviews, we don’t want those blockages
to last too long. So, I can’t turn email off entirely. But I can dial it
down fairly far.

Besides cutting down on email during the week, I also want to break
myself of the habit of checking work email over the weekend. Working for
a startup, it is too easy (for me) to get sucked into giving up weekend
after weekend. This is draining, so I’m not as fresh during the week as
I would be if I avoided the work mail. But, I don’t want to give up my
personal email at the same time.

image0So, the question is, how do I strike that balance?

The first step was to decide what my new mail schedule would be. I
tend to get up fairly early in the mornings, and enjoy breakfast on the
patio when the weather is nice enough (it rained last night, finally).
This is relaxing time, but not especially conducive to the long
stretches of deep thought needed for development or debugging. So,
mornings are a good time to do a lot of email, instant messaging with
the rest of the team, review code or documentation, and the other sorts
of tasks that don’t take hours at a stretch to complete. Afternoons are
too warm to sit outside and think anyway, so I move inside to work on
coding projects then. That gives me a schedule: I am willing to have
more interactions (and interruptions) in the morning than the afternoon
and I want to “reclaim” weekends. The next step is to tell Mail the

image1I use the same email client (OS X’s Mail.app) to access all
of my mail accounts. Even though I use IMAP, this lets me read and
search old messages when I don’t have access to the network. The
brute-force way would be to manually change the preference “Check for
new mail” to the appropriate schedule. I hate doing things like this
manually, though.

I’ve done some work with AppleScript and Mail in the past. This
week (I’m not sure why it took me so long to figure out this approach) I
realized I could use AppleScript to control how often Mail checks for
new messages, and which accounts are checked.

Now that I have a general schedule identified, I can configure some
events in iCal using AppleScripts to control Mail. I began by composing
a few AppleScripts in Script Editor.

To check mail frequently in the morning:


To check mail infrequently, for the afternoons:


To turn of automatic checking entirely in the evening:


To disable my work account for the weekend:


To enable my work account on Monday mornings:


With the scripts in place, I configured events in iCal to run the
scripts to adjust my settings at appropriate times.

image7Every week day morning, I turn up the frequency to every 5
minutes. This ensures that by the time I am up and ready to look at
email, the mailbox is up to date.

image8Around lunch time, I turn the frequency back down to once
per hour. I find I don’t even notice the change, and when I come back
from lunch I am ready to settle in and concentrate. I don’t make it
through the afternoon without checking email, but stretching out the
time between checks does help.

image9And in the evenings, I turn email off entirely. Note that
this script only runs Monday-Thursday. On Friday, I leave Mail set to
check messages once per hour, since I do receive personal messages over
the weekend and I want to see those.

image10To avoid being sucked back into work, I disable that
account entirely. Of course, on Monday morning, I have a similar job
scheduled to run the MailCheckWorkEnable script to re-enable the account
for the week.

Disabling the account entirely seemed like a drastic step, but is very
effective. When Monday comes around, I am refreshed and ready to work
again. I do not miss any personal mail, and have not been tempted to
“just look at this one thing” from my work messages.