Rat Mail? More Like Rat FAIL.
Do you remember how excited I was the other day that I had strung together a collection of scripts that were going to send me email every Monday morning telling me about the account registrations from sketchy domains (note to self: register for an API key so that the sketchy-domain checking* can be more robust than just a heuristic based on a regular expression) and new accounts that logged in from both the homes and the schools of well-known troublemakers?
Well, launchd
let me down. Or maybe I let myself down.
Yesterday morning when I arrived at work, there was a half-composed email message open in Mail.app. Something had gone terribly wrong.
The R script never ran. The file still contained the placeholder text. This is weird
because in my testing, when I told launchd
to run the R script at a specific time in
the not-too-distant future, it did. But when I told it to run it at a specific time on
Monday morning, it didn’t.
Likewise, the AppleScript failed, too. Again, it worked in testing. But it did not succeed in populating the header fields of the email.
I had told the power management settings on my computer to wake it up in time for everything to run. Are computers groggy when they first wake up?
And, adding insult to injury, I had another headache yesterday afternoon, so I wasn’t able to focus enough to improve and debug my script. Instead I spent most of the day dealing with the email that arrived over the weekend, the homework bug reports, various other reports that came in, and an assortment of hiring tasks (WE ARE HIRING). Today is my real chance to get things done because a significant part of tomorrow will be spent interviewing (PLEASE ASK YOUR FRIENDS TO APPLY), and Thursday I am taking half of the day off to watch THE LUFTHANSA PLANE COME DIRECT FROM FRANKFURT (please don’t rain).
*My learning how to query FlightXML via GET requests with an API key will pay off! There is a service that tells you which domains are sketchy, and you just send a GET request with the domain as the value of the variables and your API key in the header, and it will return JSON!