How to run a R script from the task scheduler via a .bat file

后端 未结 1 764
既然无缘
既然无缘 2021-02-01 11:33

I\'m a novice when it comes anything outside of coding for R. I\'ve looked up many similar posts but they aren\'t detailed enough as I\'m unfamiliar with many of the terms.

1条回答
  •  -上瘾入骨i
    2021-02-01 11:53

    On Linux:

    R CMD BATCH [options] my_script.R [outfile]
    

    On Microsoft Windows (adjust the path to R.exe as needed):

    "C:\Program Files\R\R-2.13.1\bin\R.exe" CMD BATCH 
       --vanilla --slave "c:\my projects\my_script.R"
    

    From here.

    0 讨论(0)
提交回复
热议问题