How to automate R scripts in rstudio?



Hi Team,

I have r code file and i want to automate (it has ti run for every 12 hrs) ,
but thing is code has to return the output and it has to save in particular directory.
Can any one help?

I have the .Rmd file and it needs to be knit for every 12 hours also file name should include Sys.Date()-1.

below code i used and getting error :

rmarkdown::render("/home/saisaran/Project-2/Montly report.Rmd", 
                 format(Sys.Date(), format = "%m-%d-%y")))


Error: path for html_dependency not found: 


Hi, could you be more specific?

Could you also share a sample code?


I mean there is one Rscript for Annual reports/Monthly reports/Weekly reports included in r code.
when u run the complete code it will generate 5 reports (ggplot2,plotly)

So i want to run the total rscript for every particular time period.


updated the code…pls let me know if u have any idea thanks for the response.


take a look ,


thank u so much for the response @mohamed_d180 :slight_smile:


Did you get this to work? I assume you are using Windows RStudio application and not RStudio server. Are you running your rscripts from r code or using some kind of external software to activate the R Script?


i am using normal r scripts only…and system with ubuntu 18.04 . now its working fine.