title: R script to Task Scheduler
body: <p>I have an R script that gets data from databases on another server and brings it into my database. I have it saved as "dataimport.R"  </p>
  
  <p>I followed a few answers from here and from other websites and created a batch file like this:  </p>
  
  <pre><code>"C:\Program Files\R\R-3.4.0\bin\R.exe" CMD BATCH  --vanilla --slave "C:\dataimport.R" 
  </code></pre>
  
  <p>This is not working. The cmd window opens up but the tables are not recreated and I dont get any error. I wanted to run the Task Scheduler to automate the process. Any ideas on how to fix this?</p>