Automatic daily tweet
January 26, 2019 6:03 AM Subscribe
If I have 365 tweets, one for each day of the year, what’s the best way to get them tweeted automatically, each on the relevant day?
I'd use a cron job too, because I am old and crusty like that and I have an always-on Odroid XU4 running in the shed. But apparently the cool kids would do it with Google Calendar and IFTTT.
posted by flabdablet at 6:50 AM on January 26, 2019 [2 favorites]
posted by flabdablet at 6:50 AM on January 26, 2019 [2 favorites]
...in fact, one (Unix-y) way to do this via cron would be to use the date commands +%j format variable, which returns the number of the day of the year. Put your tweets into one big file, one tweet per line. Stuff that +%j into a variable (
("NUM"), return the Nth line of your file which is the tweet for that day, then pipe it to your Twitter CLI widget, along the lines of this:
sed -n NUMp my_file_of_tweets.txt | my_twitter_CLI_widget
You could wrap this in a shell script pretty easily, then schedule it to run daily with cron. Setting up an CLI twitter client is not difficult, though you'll need to go through an authorization step to give it access to the account. I've used oysttyer quite a bit in the past and it works pretty well.
Sorry if this is a bit redundant, but I no sooner posted earlier before going into how-exactly-would-I-do-this mode.
posted by jquinby at 7:59 AM on January 26, 2019
("NUM"), return the Nth line of your file which is the tweet for that day, then pipe it to your Twitter CLI widget, along the lines of this:
sed -n NUMp my_file_of_tweets.txt | my_twitter_CLI_widget
You could wrap this in a shell script pretty easily, then schedule it to run daily with cron. Setting up an CLI twitter client is not difficult, though you'll need to go through an authorization step to give it access to the account. I've used oysttyer quite a bit in the past and it works pretty well.
Sorry if this is a bit redundant, but I no sooner posted earlier before going into how-exactly-would-I-do-this mode.
posted by jquinby at 7:59 AM on January 26, 2019
Tumblr will send posts to Twitter and you can set it to automatically post at regular intervals.
Hootsuite's free account still lets you schedule posts, but I believe it's only up to 30 at a given time.
There may be other social media management tools which will accomplish this as well.
posted by crush at 9:03 AM on January 26, 2019
Hootsuite's free account still lets you schedule posts, but I believe it's only up to 30 at a given time.
There may be other social media management tools which will accomplish this as well.
posted by crush at 9:03 AM on January 26, 2019
I use a variety of social media marketing tools that could do this, but most cost money.
For your needs, a Zapier zap that detects a Google calendar event starting, then posts the name of the event to Twitter, is how I'd do it.
So you'd create a sub-calendar in Gcal with the tweets per day, then link it to Twitter with a Zapier zap.
posted by MonsieurBon at 4:25 PM on January 26, 2019
For your needs, a Zapier zap that detects a Google calendar event starting, then posts the name of the event to Twitter, is how I'd do it.
So you'd create a sub-calendar in Gcal with the tweets per day, then link it to Twitter with a Zapier zap.
posted by MonsieurBon at 4:25 PM on January 26, 2019
This thread is closed to new comments.
* - for a Unix nerd
posted by jquinby at 6:24 AM on January 26, 2019 [1 favorite]