Thank you everyone for your help.

I have managed to now figure it out by creating a batch file to run R. I
can then schedule this batch file to run. 

Not sure if this is the best way of doing it but it seems to work for
me.

 

Thank you for the help

Alex

 

________________________________

From: Greg Snow [mailto:538...@gmail.com] 
Sent: 11 October 2013 18:45
To: Johnson, Alex
Cc: r-help
Subject: Re: [R] automation of an R script to run



Look at the ?Startup help page in R.  It shows a couple of ways to have
code run automatically when R starts (and can depend on which folder R
starts from).  So you could have the windows task scheduler run R and
use the above to set the script to run.



Also look at ?Rscript for a way to run a script in batch mode, you can
schedule a run of Rscript on a specific script file.



Within R there is the tclTaskSchedule function in the tcltk2 package.
If you leave R running then that function can set some code to run at a
given time, or at a regular interval.



On Fri, Oct 11, 2013 at 2:04 AM, Johnson, Alex <alex.john...@theaa.com>
wrote:

Hi,



I was wondering if there is there a way you can schedule an R script to
run automatically through a scheduled task in windows or similar?..

Would R have to be open on the user's PC or could it be closed providing
we pointed it correctly at R?...


Thank you



Alex



Alex Johnson

Operational Research Analyst

The AA

01256 492133 / Ext 622133



Automobile Association Developments Limited. Registered office: Fanum
House, Basing View, Basingstoke, RG21 4EA. Registered in England and
Wales Number: 01878835



"To our Members we're the 4th Emergency Service"
This electronic message contains information from The\ A...{{dropped:24}}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to