0

It's likely this question has been asked / answered but I couldn't find the proper post. Likely I'm using the wrong keywords.

I have an SQL system on an Windows machine which runs daily stored procedures for updating models and other maintenance tasks. Currently, I'm looking to do some analysis which is a little bit more involved and I've written a function in R which reads from the Server operates some magic and then loads the new data back into the server.

Is there a standard way of automating this process to run once a day? Hoping to keep my system as autonomous as possible.

hrbrmstr
  • 77,368
  • 11
  • 139
  • 205
jameselmore
  • 442
  • 9
  • 20
  • In UNIX-alikes, this would probably be a chron job. – IRTFM Oct 03 '14 at 19:39
  • Unfortunately I'm not on a UNIX-alike machine. Original post edited to reflect this. – jameselmore Oct 03 '14 at 19:40
  • On Windows you can create a `.bat` file to execute your script using `Rscript` or `R CMD BATCH` and use the windows task scheduler to automate the execution. There are a few similar questions on SO; [this might help](http://stackoverflow.com/questions/19933597/how-to-run-a-r-script-from-the-task-scheduler-via-a-bat-file). – nrussell Oct 03 '14 at 19:41
  • 3
    You should add the appropriate tag. And please do search. When I searched on "windows scheduling" I got 11,000+ hits. – IRTFM Oct 03 '14 at 19:41
  • @BondedDust thanks for the hints. I tried some googling but obviously my choice of keyword was subpar. – jameselmore Oct 03 '14 at 19:55
  • [This](http://stackoverflow.com/questions/19933597/how-to-run-a-r-script-from-the-task-scheduler-via-a-bat-file) should help get you started. – hrbrmstr Oct 04 '14 at 00:47

0 Answers0