Run R scripts with Pushbullet Alerts
- Sign up for Pushbullet and install it on your devices/browsers if you haven't already.
- Log in to https://www.pushbullet.com/#settings, click on "Create Access Token", and get the token.
RPushbullet::pbSetup(<YOUR_ACCESS_TOKEN>)to create a config file and select your default devices to send messages to.
- Restart R
The package has six functions, each of which has an accompanying RStudio Add-In
source_and_pb(script_path)runs a script and sends a Pushbullet alert when it is complete. An alert is also sent if the script errors. If
NULL, the RStudio interface is used to select a file.
bg_and_pb()runs the script in a background session with the same alerts. It returns an
job_and_pb()runs the script as an RStudio Job with the same alerts. Note that the progress bar will not display anything.
job_current_and_pb()do the same but run the current active file in the RStudio editor. They're especially handy if you assign the Add-Ins keyboard shortcuts.
Note that background sessions are child processes of the R session in which they are launched, and will be killed is if you quit or restart R.
Please note that the 'pbjob' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.