In this blog we will learn how to schedule R Script using Windows Task Scheduler!

Suppose here is the R Script which we want to schedule.

Output of this script: Create a log file of name “R_Scripts_Logs_<Time stamp>.TXT” & having text “Script successfully invoked by scheduler at <Time stamp>” .


Create a batch file having below commands:

@echo off
“Location of R.exe” CMD BATCH “Location of R Script”



Steps for scheduling R Script using Windows Task Scheduler:

Open Window Task Scheduler & Create Basic Task


Step 1: Provide your task name & description.step-1

Step 2: Provide trigger timings details as per your requirement.



Step 3: In Action:- provide the location of the batch file of the script. After that save the task.


Task has been scheduled.


At 22:05, task triggered the batch file automatically.

Here is the output of that script:


When you run R script using CMD Batch, one ROUT file also generated automatically having details of script commands & time elapsed of script.

Below is ROUT fie of the script my R Script.R



Happy Learning! Your feedback would be appreciated!

2 thoughts on “Scheduling R Script using Windows Task Scheduler

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s