Search code examples
rtriggersnotificationsiterm2

Notification when a R process is finished [iTerm2]


I'm running R within a HPC and I'd like to be notified when a long running process is finished (within R terminal, not as a Rscript).

I know the way to do it is through triggers but I have no idea how to... any idea, please?


Solution

  • It's simpler what I thought, but as anyone didn't answer, here there's my (posible) solution:

    1. Write a simple function called fin(): fin <- function(){print("fin")}
    2. Then go to Preferences > Profiles > Advanced > Triggers and add a new trigger based on function's output: Regular expression = \[1\] "fin", Action = Post Notification... et voilá!