I am trying to run an R script from the terminal on an EC2 AWS Instance.
I run the following: nohup R Rfiles/MyRscript.R
With the terminal command line:
rstudio@ip-10-0-0-8:~/Dropbox/Folder$ nohup R Rfiles/MyRscript.R
My nohup.out
file says:
ARGUMENT 'Rfiles/MyRscript.R' __ignored__
Fatal error: you must specify '--save', '--no-save' or '--vanilla'
I tried adding --save
etc. without any progress so I assume I am going wrong with trying to call the R
script using nohup
.
My question is how can I run correctly the R script using nohup
so that I can leave it running and log out.
EDIT:
I tried this but got the error: ignoring input and appending output to 'nohup.out'
nohup R CMD BATCH ./Rscript.R &
EDIT 2:
This seems to be working, however I am not exactly sure what I am creating/done
nohup R CMD BATCH ./MYR_SCRIPT.R </dev/null >nohup.out 2>nohup.err