Leo’s Tech Blog
Published in

Leo’s Tech Blog

Ephemeral tweets. Running “cron” on cloud. Fly.io machines.

Part I: Why I want ephemeral tweets

Part II: Cron jobs in the cloud?

Part III: Fly.io machines

fly apps create --machines --name ephemeral-tweets
FROM caarlos0/twitter-cleaner:v0.7.0
ENTRYPOINT ["/usr/local/bin/twitter-cleaner", "--max-age=168h", "--twitter-consumer-key=XYZ", "--twitter-consumer-secret=XYZ", "--twitter-access-token=XYZ", "--twitter-access-token-secret=XYZ"]
fly machine run . -r iad --schedule daily -a ephemeral-tweets
Actually, fly is only showing the “exit” times, but looks like the machine is run daily 18:59:00 UTC
As a nice bonus, it seems like Fly would restart the machine (and thus retry) if the exit code is not 0



A personal blog on tech stuff. Includes older entries that used to live on techblog.leosoto.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store