Notify When Script Finishes

I run some "set and forget" scripts that take anywhere from a few minutes to an hour to run. While the scripts are running I work on other things, etc...

I would like RStudio to notify me when the scripts are finished running so I can quickly get to analyzing the results. Is there a way to do this?

What form of notification did you have in mind ?

A bubble notification (like what I get on email) would be great. Option to get a pop-up would be nice, too. Honestly anything to give me a heads up that my script is done so I don't have to guess.

Screen Shot 2021-03-29 at 4.04.08 PM

I don't have a Mac, so this is untested advice.

You could try using the system2() function to have the osascript utility create a notification:
Display Notifications from Terminal on Mac OS – Marduc812
osascript Man Page - macOS -

You could also install the terminal-notifier utility and use that with system2():
Send Mac OS Notifications From R |

1 Like

This sounds like a feature request, if that is actually your intent, I recommend you to file an issue on the GitHub repository for the IDE.

Otherwise, implementing notifications in your own code is the way to go as suggested by @nwerth.

There's an issue to comment on/upvote here:


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.