Skip to content

Send text messages from R to your cell phone 📱 to notify you when long-running jobs complete ⌛✔️.

Notifications You must be signed in to change notification settings

richpauloo/textme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

textme

Major thanks to Sean Kross for the { twilio } package, which this package relies entirely upon.

The heart of this package is a single function called textme() that sends you a text message 📱 the instant a long-running job completes ⌛✔️.

Now you can leave the computer while it crunches away. Go get a cofee, hit the gym, or work on other things! You’ll be notified exactly when your job completes 🎉.

Installation

textme is not currently on CRAN. Install the development version from github:

devtools::install_github("richpauloo/textme")

Example

First, sign up for a free Twilio trial account.

  1. regular sign up
  2. my referral link. If you decide to upgrade to a paid Twilio account (I have one), you and I both get $10 in free credit.

If option 2 gives you ponzi-scheme vibes, go for option 1. It doesn’t matter to me which road you take.

Next, set up a project and verify your number. The Twilio docs are good for this.

Then, provide information about your twilio account and the number you want to text. These variables are stored in "~/.Renviron" for later use. The benefit of doing it this way is that it’s virtually impossible to accidentally push these credentials to Github, which is likely if you save them in scripts.

library(textme)

# replace the values here with your own
tm_configure(twilio_sid   = "AC1ffb4917879549a0f0720c0214bde131",
             twilio_token = "f5c8904b9af81daf3e8dda09f975c369",
             twilio_phone_number = "1234567890",
             target_phone_number = "0987654321")

The above code needs to be run only once. Now, and in future R sessions, simply throw a textme() at the end of a long-running job (textme comes pre-loaded with a handful of fun messages):

Sys.sleep(5) # some long-running job
textme()     # text me when it's done!

Supply a custom message:

textme(message = "👹 Back to work! You're not paid to run around and drink ☕ all day!")

Acknowledgments

This package is inspired by { beepr }, and wouldn’t be possible without { devtools }, { roxygen2}, and RStudio.

About

Send text messages from R to your cell phone 📱 to notify you when long-running jobs complete ⌛✔️.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages