Johnny Lee

Email me when Elon Musk reactivates Donald Trump’s Twitter account

Subscribe:

On October 27, 2022, Elon Musk finally became the new owner of Twitter. It was a long six months since he sent Bret Taylor a letter with an ultimatum offer of $54.20 per share.


Expecting Mr. Musk to unwind Twitter's moderation policies, I wanted to countdown to when Elon Musk would reactivate Donald Trump’s twitter account after its deactivation after the January 6 capital insurrection.


I could check the former President’s twitter account manually every day. But this seems like an easier task for a computer to automate. 


Normally, an easy way to do this is to setup a cron job and check the Twitter regularly. This time, I decided to try using Cloudflare’s new Workers product, which includes a cron trigger feature, ability to send e-mails for free, and a very generous free usage tier


It took a tiny bit of doing: getting a Twitter API token and writing some JavaScript. The day after the deal closed, I had a Worker setup to check if a Twitter account was active, every 5 minutes. If the account is active, it would e-mail me immediately. 


Less than a month later, the e-mail arrived at 8:15pm on a Saturday night.



Apparently, 23 minutes earlier at 7:53pm, Mr. Musk decided he will reinstate Trump’s account after his public poll.


Curiously, I checked when the news hit the wires. It was a Saturday night, and most wires did not print until a couple hours later.