Revision to Twitterbot Monster
So tying the trigger to the Calendar works . . . but only if the computer is not asleep. I had considered this initially but may have over estimated how often my computer was running. It was done more for amusement anyway so here’s a way to move the whole email/trigger piece to the server using PHP. It replaces the whole AppleScript portion of the previous iteration.
I had no idea how to do this prior to Google leading me to the examples that are linked below.
The first chunk runs the cURL portion and gets the Markov response from the other page and passes it to a variable- creatively named $DICKINSON in this case. I left the echo line in there as I used it to make sure things were working.
The second chunk sends the email. You can see the $DICKINSON variable being passed in as both the message body and the subject.
The final piece is triggering this page every so often using a cron task. I am not yet positive I’ve done that right. When I’m more sure, I’ll come back and update this.