Skip to content
A minimal Example for Scheduling Windows Tasks with R
R Batchfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
apple_microsoft.Rmd
command line.R
task.R
task.bat

README.md

Make_Task

A Minimal Example for Scheduling Windows Tasks with R

Also see:

Update

Using...

@echo off
R CMD BATCH C:\Users\Tyler\Desktop\Make_Task\task.R

makes strong assumptions about where R is located and if it's on the user's path. As @apwheele points out using the full path name to run a batch file is more reliable.

@echo off
"C:\R\R-3.2.2\bin\x64\R.exe" CMD BATCH C:\Users\Tyler\Desktop\Make_Task\task.R

If the path of your R file has spaces in it, make sure to enclose the path in quotes otherwise the code won't run:

@echo off
"C:\R\R-3.2.2\bin\x64\R.exe" CMD BATCH "C:\Users\Tyler\Desktop\Some Other Path\task.R"
You can’t perform that action at this time.