Everyone,
I am running a batch file (.bat) to run a R script which works fine. My batch file is ran daily with my task manager. What I am trying to do now is figure out how to Pause my batch file, when my (R) if statement stops my R script.
# my batch file
@echo off
"C:\Program Files\R\R-3.5.2\bin\Rscript.exe" C:\Auto_R_Reports\Codes\SICK_WTGs.R
# my R Script
if(NROW(Sick_WTG_USA) == 0){
stop('NO SICK WTGs')
} else {source("./Codes/2WKcheck.R")}
The idea is that when the if statement equals true and my R script stops, I also want my batch file to pause so that I know it stopped and paused.
Aucun commentaire:
Enregistrer un commentaire